Fix google services key validity check #382
This commit is contained in:
@@ -30,7 +30,8 @@ class GoogleMapsClientFactory():
|
|||||||
# Only fails if the string dont have a correct padding for b64
|
# Only fails if the string dont have a correct padding for b64
|
||||||
# but this way we could provide a more clear error than
|
# but this way we could provide a more clear error than
|
||||||
# TypeError: Incorrect padding
|
# TypeError: Incorrect padding
|
||||||
base64.b64decode(client_secret)
|
b64_secret = client_secret.replace('-', '+').replace('_', '/')
|
||||||
|
base64.b64decode(b64_secret)
|
||||||
return True
|
return True
|
||||||
except TypeError:
|
except TypeError:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user