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

[3.5] bpo-34155: Dont parse domains containing @ (GH-13079) #15317

Merged
merged 1 commit into from Sep 7, 2019

Conversation

@maxking
Copy link
Contributor

maxking commented Aug 17, 2019

Before:

    >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
    (Address(display_name='', username='a', domain='malicious.org'),)

    >>> parseaddr('a@malicious.org@important.com')
    ('', 'a@malicious.org')

After:

    >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
    (Address(display_name='', username='', domain=''),)

    >>> parseaddr('a@malicious.org@important.com')
    ('', 'a@')

https://bugs.python.org/issue34155
(cherry picked from commit 8cb65d1)

Co-authored-by: jpic jpic@users.noreply.github.com

https://bugs.python.org/issue34155

Before:

        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
        (Address(display_name='', username='a', domain='malicious.org'),)

        >>> parseaddr('a@malicious.org@important.com')
        ('', 'a@malicious.org')

    After:

        >>> email.message_from_string('From: a@malicious.org@important.com', policy=email.policy.default)['from'].addresses
        (Address(display_name='', username='', domain=''),)

        >>> parseaddr('a@malicious.org@important.com')
        ('', 'a@')

https://bugs.python.org/issue34155
(cherry picked from commit 8cb65d1)

Co-authored-by: jpic <jpic@users.noreply.github.com>
@alex

This comment has been minimized.

Copy link
Member

alex commented Aug 17, 2019

This needs a review from the 3.5 RM if this is going to be backported.

Copy link
Member

vstinner left a comment

LGTM: same change than 8cb65d1 already merged into master.

@vstinner

This comment has been minimized.

Copy link
Member

vstinner commented Aug 19, 2019

@larryhastings: Would you mind to merge this security fix?

@larryhastings larryhastings merged commit 063eba2 into python:3.5 Sep 7, 2019
5 checks passed
5 checks passed
bedevere/issue-number Issue number 34155 found
Details
bedevere/maintenance-branch-pr Valid maintenance branch PR title.
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Sep 7, 2019

@larryhastings: Please replace # with GH- in the commit message next time. Thanks!

@larryhastings

This comment has been minimized.

Copy link
Contributor

larryhastings commented Sep 7, 2019

Thanks for the backport and the 3.5 love!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.