Don't automatically convert API key to uppercase
authorRyan Campbell <campbellr@gmail.com>
Sat, 19 Jun 2010 19:23:39 +0000 (13:23 -0600)
committerRyan Campbell <campbellr@gmail.com>
Sat, 19 Jun 2010 19:25:49 +0000 (13:25 -0600)
Some (older?) API keys actually do have lower case characters, and since
it is case sensitive we shouldn't automatically convert all characters
to uppercase.

package/src/ui/diablo/gui.py
package/src/ui/fremantle/gui.py
package/src/validation.py

index 35bb741..e3235c9 100644 (file)
@@ -184,8 +184,7 @@ class BaseUI():
         while not valid_credentials:
             if result == gtk.RESPONSE_OK:
                 uid = uidEntry.get_text()
-                # auth() fails if api_key has lower-case characters
-                api_key = apiEntry.get_text().upper()
+                api_key = apiEntry.get_text()
             
                 try:
                     validation.uid(uid)
index 8544f70..7f4ccce 100644 (file)
@@ -185,9 +185,7 @@ class BaseUI():
         while not valid_credentials:
             if result == gtk.RESPONSE_OK:
                 uid = uidEntry.get_text()
-                # auth() fails if api_key has lower-case characters
-                api_key = apiEntry.get_text().upper()
-            
+                api_key = apiEntry.get_text()
                 try:
                     validation.uid(uid)
                     validation.api_key(api_key)
index 4643b16..cf37fd7 100644 (file)
@@ -21,8 +21,9 @@ def api_key(api_key):
         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")
+    # apparently the api key CAN contain lower case characters...
+    #elif not api_key.isupper():
+    #    raise ValidationError("API Key must only contain upper-case characters")
 
     return True