Skip to content

Commit

Permalink
Make CSRF token string rather than bytes for Django Sessions.
Browse files Browse the repository at this point in the history
  • Loading branch information
braincore committed Feb 18, 2016
1 parent bad1ac6 commit b38326a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
# built documents.
#
# The short X.Y version.
version = '5.2.1'
version = '5.2.2'
# The full version, including alpha/beta/rc tags.
release = '5.2.1'
release = '5.2.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion dropbox/dropbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
]

# TODO(kelkabany): We need to auto populate this as done in the v1 SDK.
__version__ = '5.2.1'
__version__ = '5.2.2'

import contextlib
import json
Expand Down
2 changes: 1 addition & 1 deletion dropbox/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def start(self, url_state=None):
access the user's Dropbox account. Tell the user to visit this URL
and approve your app.
"""
csrf_token = base64.urlsafe_b64encode(os.urandom(16))
csrf_token = base64.urlsafe_b64encode(os.urandom(16)).decode('ascii')
state = csrf_token
if url_state is not None:
state += "|" + url_state
Expand Down
2 changes: 1 addition & 1 deletion dropbox/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
else:
url_encode = urllib.urlencode

SDK_VERSION = "5.2.1"
SDK_VERSION = "5.2.2"

TRUSTED_CERT_FILE = pkg_resources.resource_filename(__name__, 'trusted-certs.crt')

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

dist = setup(
name='dropbox',
version='5.2.1',
version='5.2.2',
description='Official Dropbox API Client',
author='Dropbox',
author_email='[email protected]',
Expand Down

0 comments on commit b38326a

Please sign in to comment.