This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nneonneo
Recipients Thorney, georg.brandl, lemburg, loewis, nneonneo
Date 2017-08-04.00:45:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501807514.15.0.51723633216.issue29427@psf.upfronthosting.co.za>
In-reply-to
Content
This sounds reasonable. I ran into a similar issue today trying to decode a JSON Web Key. Although I don't have any real say, I'd say that if you put together a patch it may have a higher chance to get reviewed.

I wonder about the following:

- What about adding a new kwarg to b64decode, passed through by urlsafe_b64decode, called "checkpad=True" which validates padding? Then we can just set that False when we need.
- At the same time it might be nice to pass "validate=False" through from urlsafe_b64decode and friends, so we can have some nicer validation of data.
- I like adding the "padding=True" arg to encode, but it may not be necessary given the ease of ".rstrip('=')" as an alternative. Anyway, if you will add it to encode, please add it to b64encode and pass through from the variant encoders to unify the API somewhat.

If you are still interested in putting together a patch, post a comment. Otherwise I may work on a patch for this.
History
Date User Action Args
2017-08-04 00:45:14nneonneosetrecipients: + nneonneo, lemburg, loewis, georg.brandl, Thorney
2017-08-04 00:45:14nneonneosetmessageid: <1501807514.15.0.51723633216.issue29427@psf.upfronthosting.co.za>
2017-08-04 00:45:14nneonneolinkissue29427 messages
2017-08-04 00:45:12nneonneocreate