Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for python bytes-to-utf-8 encoded string in the usernames #237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thebookworm101
Copy link

This fixes the session join problem #236 that the >1 client has with opencoweb+tornado>=3.x, this is only minimally tested with tornado 2.x and tornado 3.1.1 on python 3.3.2 and OCW 5822afa

…coweb+tornado==3.x, only minimally tested with tornado 2.x and tornado 3.1.1 on python 3.3.2 and opencoweb HEAD
@@ -231,7 +231,7 @@ class SessionConnection(bayeux.BayeuxConnection):
'''Connection for uncollaborative sessions.'''
def on_auth_ext(self, cl, auth):
'''Overrides to use cookie + db for Bayeux authentication.'''
username = self._handler.current_user
username = self._handler.current_user.decode('utf-8')
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This edit may not add/remove anything as the session worked identically for me with or without the change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The username variable appears to not be used if you follow the function calls. But, your change is correct; this was an oversight related to python2/3 and the new version of Tornado conversions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants