A user was having problems getting his credentials to work, it turns out that
the API key is case sensitive.
We now automatically convert the letters in the API key to
upper-case before adding it to gconf. This was the user can input either
lower-case or upper-case letters, and both will work.
while not valid_credentials:
if result == gtk.RESPONSE_OK:
uid = uidEntry.get_text()
- api_key = apiEntry.get_text()
+ # auth() fails if api_key has lower-case characters
+ api_key = apiEntry.get_text().upper()
try:
validation.uid(uid)
while not valid_credentials:
if result == gtk.RESPONSE_OK:
uid = uidEntry.get_text()
- api_key = apiEntry.get_text()
+ # auth() fails if api_key has lower-case characters
+ api_key = apiEntry.get_text().upper()
try:
validation.uid(uid)
raise ValidationError("API Key must be %s characters" % KEY_SIZE)
elif not api_key.isalnum():
raise ValidationError("API Key must only contain alphanumeric characters")
+ elif not api_key.isupper():
+ raise ValidationError("API Key must only contain upper-case characters")
return True