-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
gh-56698: Fix base64-url parsing errors in email headers #136830
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -38,6 +38,15 @@ def test_missing_padding(self): | |||||
| # 2 missing padding characters | ||||||
| self._test(b'dg', b'v', [errors.InvalidBase64PaddingDefect]) | ||||||
|
|
||||||
| def test_urlsafe_alphabet(self): | ||||||
| self._test( | ||||||
| b'QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==', | ||||||
| b'Anmeldung Netzanschluss S\xfcdring3p.jpg', | ||||||
| [errors.InvalidBase64CharactersDefect]) | ||||||
| # Mix of 2 base64 alphabets | ||||||
|
||||||
| # Mix of 2 base64 alphabets | |
| # mix of different base64 alphabets |
I was a bit confused with "2 base64" so let's be a bit more verbose in the comment (in this case the 2 and the 64 from base64 look odd but maybe I'm tired)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
matthieucan marked this conversation as resolved.
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Accept urlsafe base64 in email headers, as those are sometimes created by | ||
| email clients. |
Uh oh!
There was an error while loading. Please reload this page.