Skip to content

Commit b38326a

Browse files
committed
Make CSRF token string rather than bytes for Django Sessions.
1 parent bad1ac6 commit b38326a

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
# built documents.
6060
#
6161
# The short X.Y version.
62-
version = '5.2.1'
62+
version = '5.2.2'
6363
# The full version, including alpha/beta/rc tags.
64-
release = '5.2.1'
64+
release = '5.2.2'
6565

6666
# The language for content autogenerated by Sphinx. Refer to documentation
6767
# for a list of supported languages.

dropbox/dropbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
]
66

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

1010
import contextlib
1111
import json

dropbox/oauth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def start(self, url_state=None):
272272
access the user's Dropbox account. Tell the user to visit this URL
273273
and approve your app.
274274
"""
275-
csrf_token = base64.urlsafe_b64encode(os.urandom(16))
275+
csrf_token = base64.urlsafe_b64encode(os.urandom(16)).decode('ascii')
276276
state = csrf_token
277277
if url_state is not None:
278278
state += "|" + url_state

dropbox/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
else:
3232
url_encode = urllib.urlencode
3333

34-
SDK_VERSION = "5.2.1"
34+
SDK_VERSION = "5.2.2"
3535

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

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
dist = setup(
2727
name='dropbox',
28-
version='5.2.1',
28+
version='5.2.2',
2929
description='Official Dropbox API Client',
3030
author='Dropbox',
3131
author_email='dev-platform@dropbox.com',

0 commit comments

Comments
 (0)