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

Pdb._runscript should use io.open_code() instead of open() #82904

Closed
plokmijnuhby mannequin opened this issue Nov 6, 2019 · 5 comments
Closed

Pdb._runscript should use io.open_code() instead of open() #82904

plokmijnuhby mannequin opened this issue Nov 6, 2019 · 5 comments
Labels
3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-security A security issue

Comments

@plokmijnuhby
Copy link
Mannequin

plokmijnuhby mannequin commented Nov 6, 2019

BPO 38723
Nosy @jsnklln, @zooba, @miss-islington, @plokmijnuhby
PRs
  • bpo-38723: Pdb._runscript should use io.open_code() instead of open() #17127
  • [3.8] bpo-38723: Pdb._runscript should use io.open_code() instead of open() (GH-17127) #17135
  • 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 2019-11-12.22:49:40.640>
    created_at = <Date 2019-11-06.16:05:27.455>
    labels = ['type-security', '3.8', 'library', '3.9']
    title = 'Pdb._runscript should use io.open_code() instead of open()'
    updated_at = <Date 2019-11-12.23:09:11.369>
    user = 'https://github.com/plokmijnuhby'

    bugs.python.org fields:

    activity = <Date 2019-11-12.23:09:11.369>
    actor = 'miss-islington'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-11-12.22:49:40.640>
    closer = 'steve.dower'
    components = ['Library (Lib)']
    creation = <Date 2019-11-06.16:05:27.455>
    creator = 'plokmijnuhby'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38723
    keywords = ['patch']
    message_count = 5.0
    messages = ['356145', '356264', '356500', '356502', '356505']
    nosy_count = 4.0
    nosy_names = ['Jason.Killen', 'steve.dower', 'miss-islington', 'plokmijnuhby']
    pr_nums = ['17127', '17135']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'security'
    url = 'https://bugs.python.org/issue38723'
    versions = ['Python 3.8', 'Python 3.9']

    @plokmijnuhby
    Copy link
    Mannequin Author

    plokmijnuhby mannequin commented Nov 6, 2019

    Fairly obviously, if you're using something called _runscript you're probably trying to run some code. To do this it has to open the script as a file.

    This is similar to two other issues I'm posting, but they're in different modules, so different bugs.

    @plokmijnuhby plokmijnuhby mannequin added stdlib Python modules in the Lib dir 3.9 only security fixes type-security A security issue labels Nov 6, 2019
    @jsnklln
    Copy link
    Mannequin

    jsnklln mannequin commented Nov 8, 2019

    I flipped through PEP-578 (Runtime Audit Hooks) and this seems like the type of situation that PEP-578 was trying to handle. I've got a change that seems to be working and can provide a PR or whatever once I remember/read up on doing that. (I'm a very seldom contributor and am more than happy to defer to those that know more than me.)

    @zooba
    Copy link
    Member

    zooba commented Nov 12, 2019

    New changeset d593881 by Steve Dower (jsnklln) in branch 'master':
    bpo-38723: Pdb._runscript should use io.open_code() instead of open() (GH-17127)
    d593881

    @zooba
    Copy link
    Member

    zooba commented Nov 12, 2019

    Thanks for the PR!

    @zooba zooba added the 3.8 only security fixes label Nov 12, 2019
    @zooba zooba closed this as completed Nov 12, 2019
    @miss-islington
    Copy link
    Contributor

    New changeset 0a8e7fd by Miss Islington (bot) in branch '3.8':
    bpo-38723: Pdb._runscript should use io.open_code() instead of open() (GH-17127)
    0a8e7fd

    @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.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-security A security issue
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants