Commit 42bcd9c2 by Alexander Kryklia

updated comment

parent ec9b3d67
""" """
Module that allows to insert LTI tools to page. Module that allows to insert LTI tools to page.
Module uses current 0.14.2 version of requests (oauth part).
Please update code when upgrading requests.
""" """
import logging import logging
...@@ -80,9 +82,9 @@ class LTIModule(LTIFields, XModule): ...@@ -80,9 +82,9 @@ class LTIModule(LTIFields, XModule):
# 0.14.2 (current) version of requests oauth library encodes signature, # 0.14.2 (current) version of requests oauth library encodes signature,
# with 'Content-Type': 'application/x-www-form-urlencoded' # with 'Content-Type': 'application/x-www-form-urlencoded'
# so '='' becomes '%3D', but server waits for unencoded signature. # so '='' becomes '%3D'.
# Decode signature back: # We send form via browser, so browser will encode it again,
# may be it may be encoded by browser again... check # So we need to decode signature back:
params[u'oauth_signature'] = urllib.unquote(params[u'oauth_signature']).decode('utf8') params[u'oauth_signature'] = urllib.unquote(params[u'oauth_signature']).decode('utf8')
return params return params
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment