diff --git a/setup.py b/setup.py index 54b4092..7ab3053 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='django-wordpress-auth', - version='0.1.0', + version='0.1.1', description='Django integration with WordPress authentication and roles / capabilities system.', long_description=open('README.rst').read(), include_package_data=True, diff --git a/wordpress_auth/__init__.py b/wordpress_auth/__init__.py index ae4a369..54b62d7 100644 --- a/wordpress_auth/__init__.py +++ b/wordpress_auth/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.1.0' +__version__ = '0.1.1' from django.conf import settings diff --git a/wordpress_auth/utils.py b/wordpress_auth/utils.py index 57ffaa1..76c12e5 100644 --- a/wordpress_auth/utils.py +++ b/wordpress_auth/utils.py @@ -2,11 +2,7 @@ import hashlib from time import time -try: - from urllib.parse import urljoin, unquote -except ImportError: - from urlparse import urljoin # Python 2 - from urllib2 import unquote +from django.utils.six.moves.urllib.parse import urljoin, unquote_plus from wordpress_auth import WORDPRESS_LOGGED_IN_KEY, WORDPRESS_LOGGED_IN_SALT from wordpress_auth.models import WpOptions, WpUsers @@ -28,7 +24,7 @@ def get_wordpress_user(request): cookie = request.COOKIES.get('wordpress_logged_in_' + cookie_hash) if cookie: - cookie = unquote(cookie) + cookie = unquote_plus(cookie) return _validate_auth_cookie(cookie)