You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
client.py uses urllib.urlencode, which percent-encodes the tilde character (~) as %7E in order to generate the signature. ~ isn't really a reserved character, so this isn't guaranteed consistent with other URI libraries.
On the other hand, the base_url is encoded via requests in which the tilde issue has been corrected and no longer matches urllib's weird behavior.
Ultimately this results in a 403 error (client id omitted below):
"Unable to authenticate the request. Provided 'signature' is not valid for the provided client ID, or the provided 'client' is not valid.
The signature was checked against the URL: /maps/api/geocode/json?address=560+Maple+Street+South+%2310~&components=administrative_area%3AMN%7Clocality%3AWaconia%7Cpostal_code%3A55387&client=
If this does not match the URL you requested, please ensure that your request is URL encoded correctly. Learn more: https://developers.google.com/maps/documentation/business/webservices/auth"
Although tildes should be rare, ideal behavior would probably be either:
Use the same encoding library for the base_url and for computing the authed_url, or
Raise an informative exception on disallowed characters (incl. tilde)
instead of waiting for a non-specific 403.
The text was updated successfully, but these errors were encountered:
client.py uses urllib.urlencode, which percent-encodes the tilde character (~) as %7E in order to generate the signature. ~ isn't really a reserved character, so this isn't guaranteed consistent with other URI libraries.
On the other hand, the base_url is encoded via requests in which the tilde issue has been corrected and no longer matches urllib's weird behavior.
Ultimately this results in a 403 error (client id omitted below):
Although tildes should be rare, ideal behavior would probably be either:
instead of waiting for a non-specific 403.
The text was updated successfully, but these errors were encountered: