diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-12-23 23:55:44 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-12-23 23:55:44 +0100 |
commit | 1eac751bd2b3ecf4f9bfffe101c3f16f1e49eba6 (patch) | |
tree | 374dfcf87663c81b476fa8f7f978bad9d72ef52e | |
parent | 601e6e0cce3af9a2521e6bf4e6d50740c84dc653 (diff) | |
download | mediagoblin-1eac751bd2b3ecf4f9bfffe101c3f16f1e49eba6.tar.lz mediagoblin-1eac751bd2b3ecf4f9bfffe101c3f16f1e49eba6.tar.xz mediagoblin-1eac751bd2b3ecf4f9bfffe101c3f16f1e49eba6.zip |
Fix some unicode related issues in oauth and the api.
Found using the previous commit.
-rw-r--r-- | mediagoblin/plugins/httpapiauth/__init__.py | 2 | ||||
-rw-r--r-- | mediagoblin/tests/test_api.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/plugins/httpapiauth/__init__.py b/mediagoblin/plugins/httpapiauth/__init__.py index d3d2065e..081b590e 100644 --- a/mediagoblin/plugins/httpapiauth/__init__.py +++ b/mediagoblin/plugins/httpapiauth/__init__.py @@ -41,7 +41,7 @@ class HTTPAuth(Auth): return False user = request.db.User.query.filter_by( - username=request.authorization['username']).first() + username=unicode(request.authorization['username'])).first() if user.check_login(request.authorization['password']): request.user = user diff --git a/mediagoblin/tests/test_api.py b/mediagoblin/tests/test_api.py index de61c681..188cdadb 100644 --- a/mediagoblin/tests/test_api.py +++ b/mediagoblin/tests/test_api.py @@ -101,4 +101,4 @@ class TestAPI(object): assert response.status_int == 200 - assert self.db.MediaEntry.query.filter_by(title='Great JPG!').first() + assert self.db.MediaEntry.query.filter_by(title=u'Great JPG!').first() |