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

Issues with urllib.request.proxy_bypass_environment #83238

Closed
serhiy-storchaka opened this issue Dec 15, 2019 · 4 comments
Closed

Issues with urllib.request.proxy_bypass_environment #83238

serhiy-storchaka opened this issue Dec 15, 2019 · 4 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 39057
Nosy @orsenthil, @serhiy-storchaka, @miss-islington
PRs
  • bpo-39057: Fix urllib.request.proxy_bypass_environment(). #17619
  • [3.8] bpo-39057: Fix urllib.request.proxy_bypass_environment(). (GH-17619) #17829
  • [3.7] bpo-39057: Fix urllib.request.proxy_bypass_environment(). (GH-17619) #17830
  • 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 2020-01-05.13:33:12.170>
    created_at = <Date 2019-12-15.19:45:57.537>
    labels = ['3.7', '3.8', 'type-bug', 'library', '3.9']
    title = 'Issues with urllib.request.proxy_bypass_environment'
    updated_at = <Date 2020-01-05.13:33:12.169>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2020-01-05.13:33:12.169>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-01-05.13:33:12.170>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2019-12-15.19:45:57.537>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39057
    keywords = ['patch']
    message_count = 4.0
    messages = ['358444', '359332', '359335', '359336']
    nosy_count = 3.0
    nosy_names = ['orsenthil', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['17619', '17829', '17830']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue39057'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @serhiy-storchaka
    Copy link
    Member Author

    There are several issues with urllib.request.proxy_bypass_environment:

    1. Leading dots are ignored in the proxy list, but not in the checked hostname. So ".localhost" does not matches ".localhost" in the proxy list.

    2. A single trailing \n in the checked hostname is ignored, so "localhost\n" passes the check if the proxy list contains "localhost". But "localhost\n\n" and "localhost " do not pass. This is an artifact of using $ in the regular expression.

    @serhiy-storchaka serhiy-storchaka added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 15, 2019
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 6a265f0 by Serhiy Storchaka in branch 'master':
    bpo-39057: Fix urllib.request.proxy_bypass_environment(). (GH-17619)
    6a265f0

    @miss-islington
    Copy link
    Contributor

    New changeset 880a17a by Miss Islington (bot) in branch '3.7':
    bpo-39057: Fix urllib.request.proxy_bypass_environment(). (GH-17619)
    880a17a

    @miss-islington
    Copy link
    Contributor

    New changeset fc84d50 by Miss Islington (bot) in branch '3.8':
    bpo-39057: Fix urllib.request.proxy_bypass_environment(). (GH-17619)
    fc84d50

    @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
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants