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

email iter_attachments can mutate the payload #72175

Closed
bitdancer opened this issue Sep 7, 2016 · 3 comments
Closed

email iter_attachments can mutate the payload #72175

bitdancer opened this issue Sep 7, 2016 · 3 comments
Labels
topic-email type-bug An unexpected behavior, bug, or error

Comments

@bitdancer
Copy link
Member

BPO 27988
Nosy @warsaw, @bitdancer
Files
  • iter_attachments_mutation.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2016-09-07.17:43:38.039>
    created_at = <Date 2016-09-07.01:57:16.582>
    labels = ['type-bug', 'expert-email']
    title = 'email iter_attachments can mutate the payload'
    updated_at = <Date 2016-09-07.17:43:38.038>
    user = 'https://github.com/bitdancer'

    bugs.python.org fields:

    activity = <Date 2016-09-07.17:43:38.038>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-09-07.17:43:38.039>
    closer = 'r.david.murray'
    components = ['email']
    creation = <Date 2016-09-07.01:57:16.582>
    creator = 'r.david.murray'
    dependencies = []
    files = ['44417']
    hgrepos = []
    issue_num = 27988
    keywords = ['patch']
    message_count = 3.0
    messages = ['274700', '274763', '274849']
    nosy_count = 2.0
    nosy_names = ['barry', 'r.david.murray']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue27988'
    versions = ['Python 3.5', 'Python 3.6']

    @bitdancer
    Copy link
    Member Author

    In the right (wrong) circumstances the iter_attachments function may mutate the payload list. The fix is simple (make a copy before operating on it). Attached is a patch with test.

    @bitdancer bitdancer added type-bug An unexpected behavior, bug, or error topic-email labels Sep 7, 2016
    @warsaw
    Copy link
    Member

    warsaw commented Sep 7, 2016

    LGTM +1

    @bitdancer
    Copy link
    Member Author

    I forgot the # on the issue number in the commit. The hashes are:

    3.5 3bf2f6818719
    3.6 69da5242aae3

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-email type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants