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

OAuthRequest.to_postdata(self) in module oauth.py can mess up signature #1

Open
sunekj opened this issue Nov 6, 2009 · 1 comment

Comments

@sunekj
Copy link

sunekj commented Nov 6, 2009

def to_postdata(self):
return '&'.join(['%s=%s' % (escape(str(k)), escape(str(v))) for k, v in self.parameters.iteritems()])

I had a case where my signature contained an equal-sign (=). Escaping the signature resulted in that being replaced by "%3D", which caused twitter to give me a 401 when trying to request an unauthorized token.
I fixed the issue simply by not escaping v, but maybe there's a better approach.

-- FIXED --
def to_postdata(self):
return '&'.join(['%s=%s' % (escape(str(k)), str(v)) for k, v in self.parameters.iteritems()])

@vascopatricio
Copy link

Sunekj could you put the source code running ? I am having a bug , could you check my other post? Issue.

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

No branches or pull requests

2 participants