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

Get TypeError: Incorrect padding for some files. #54

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@dhardy92
Contributor

dhardy92 commented Jan 10, 2012

Hello,

For some files I get following error :
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/tornado/web.py", line 1040, in wrapper
return method(self, _args, *kwargs)
File "/usr/local/lib/python2.6/dist-packages/thumbor/handlers/crypto.py", line 29, in get
opt = cr.decrypt(crypto)
File "/usr/local/lib/python2.6/dist-packages/thumbor/crypto.py", line 63, in decrypt
debased = base64.urlsafe_b64decode(encrypted.encode("utf-8"))
File "/usr/lib/python2.6/base64.py", line 112, in urlsafe_b64decode
return b64decode(s, '-
')
File "/usr/lib/python2.6/base64.py", line 76, in b64decode
raise TypeError(msg)
TypeError: Incorrect padding

so I add '=' padding in the base64 string.

@heynemann

This comment has been minimized.

Show comment
Hide comment
@heynemann

heynemann Feb 2, 2012

Member

Can you provide a test that shows this error?

Member

heynemann commented Feb 2, 2012

Can you provide a test that shows this error?

@dhardy92

This comment has been minimized.

Show comment
Hide comment
@dhardy92

dhardy92 Feb 3, 2012

Contributor

I can't get those errors any more.
I suggest to close this PR.

Contributor

dhardy92 commented Feb 3, 2012

I can't get those errors any more.
I suggest to close this PR.

@dhardy92 dhardy92 closed this Feb 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment