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

Forbid passing SSLSocket into asyncio methods #90410

Closed
matan1008 mannequin opened this issue Jan 4, 2022 · 2 comments
Closed

Forbid passing SSLSocket into asyncio methods #90410

matan1008 mannequin opened this issue Jan 4, 2022 · 2 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-asyncio topic-SSL type-bug An unexpected behavior, bug, or error

Comments

@matan1008
Copy link
Mannequin

matan1008 mannequin commented Jan 4, 2022

BPO 46252
Nosy @tiran, @asvetlov, @1st1, @matan1008
PRs
  • bpo-46252: Prevent _SelectorSocketTransport from closing on SSLWantRe… #30385
  • bpo-46252: Raise TypeError if SSLSocket is passed to asyncio transport-based methods #31442
  • [3.10] bpo-46252: Raise TypeError if SSLSocket is passed to asyncio transport-based methods (GH-31442) #31443
  • [3.9] bpo-46252: Raise TypeError if SSLSocket is passed to asyncio transport-based methods (GH-31442) #31444
  • 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 2022-02-20.12:49:51.258>
    created_at = <Date 2022-01-04.05:46:27.764>
    labels = ['expert-SSL', 'type-bug', '3.9', '3.10', '3.11', 'expert-asyncio']
    title = 'Forbid passing SSLSocket into asyncio methods'
    updated_at = <Date 2022-02-20.12:49:51.258>
    user = 'https://github.com/matan1008'

    bugs.python.org fields:

    activity = <Date 2022-02-20.12:49:51.258>
    actor = 'asvetlov'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-02-20.12:49:51.258>
    closer = 'asvetlov'
    components = ['asyncio', 'SSL']
    creation = <Date 2022-01-04.05:46:27.764>
    creator = 'matan1008'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46252
    keywords = ['patch']
    message_count = 2.0
    messages = ['413580', '413583']
    nosy_count = 4.0
    nosy_names = ['christian.heimes', 'asvetlov', 'yselivanov', 'matan1008']
    pr_nums = ['30385', '31442', '31443', '31444']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue46252'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @matan1008 matan1008 mannequin assigned tiran Jan 4, 2022
    @matan1008 matan1008 mannequin added 3.10 only security fixes 3.11 only security fixes topic-asyncio topic-SSL type-bug An unexpected behavior, bug, or error labels Jan 4, 2022
    @tiran tiran unassigned tiran Jan 4, 2022
    @asvetlov
    Copy link
    Contributor

    SSLSocket is a blocking object by definition, it is not compatible with asyncio.

    asyncio has a check for SSLSocket in sock_*() operations, it should be extended to transport-based API

    @asvetlov asvetlov changed the title SSLWantReadError causes _SelectorSocketTransport to close Forbid passing SSLSocket into asyncio methods Feb 20, 2022
    @asvetlov asvetlov changed the title SSLWantReadError causes _SelectorSocketTransport to close Forbid passing SSLSocket into asyncio methods Feb 20, 2022
    @asvetlov asvetlov added 3.9 only security fixes labels Feb 20, 2022
    @asvetlov
    Copy link
    Contributor

    The issue can be backported.
    It doesn't change existing behavior but raises a better error.

    @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.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-asyncio topic-SSL type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants