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.10] gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993) #93543

Merged
merged 5 commits into from Sep 20, 2022

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 6, 2022

…arams (pythonGH-91993)

(cherry picked from commit b9509ba)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@encukou
Copy link
Member

encukou commented Jun 6, 2022

@gpshead said:

The failure scenario for an application where we simply start claiming no match (return None?) on potentially suspicious filenames seems acceptable. I doubt it would be a big deal to users if any even notice at all. So if you want to go forward with a PR like #91993 my gut feeling is that nobody is going to balk at the change, even in security only release branches.

@pablogsal, do you agree?

@pablogsal
Copy link
Member

@gpshead said:

The failure scenario for an application where we simply start claiming no match (return None?) on potentially suspicious filenames seems acceptable. I doubt it would be a big deal to users if any even notice at all. So if you want to go forward with a PR like #91993 my gut feeling is that nobody is going to balk at the change, even in security only release branches.

@pablogsal, do you agree?

I agree, but I am still not confident on backporting it, so unless there is some clear consensus from everyone I would recommend to be cautious here.

@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅ .

@encukou
Copy link
Member

encukou commented Jun 6, 2022

Who's "everyone"?
Not too many people are interested in mailcap :)

@pablogsal
Copy link
Member

pablogsal commented Jun 6, 2022

Everyone is any core Dev interested on mailcap that want to voice their opinion. If nobody objects or everyone is just you and @gpshead then go ahead and merge it :)

@encukou
Copy link
Member

encukou commented Jun 9, 2022

So let's ping core devs from the original issue – but I doubt even they are particularly interested in mailcap.

@zooba @brettcannon @vstinner, do you agree with Greg?

The failure scenario for an application where we simply start claiming no match (return None?) on potentially suspicious filenames seems acceptable. I doubt it would be a big deal to users if any even notice at all. So if you want to go forward with a PR like [this] my gut feeling is that nobody is going to balk at the change, even in security only release branches.

Doc/library/mailcap.rst Outdated Show resolved Hide resolved
@brettcannon
Copy link
Member

So let's ping core devs from the original issue – but I doubt even they are particularly interested in mailcap.

Correct, I am not interested and thus have no opinion. 😁

@zooba
Copy link
Member

zooba commented Jun 9, 2022

My only strong preference is that there should be a clear what's new entry that specifies at least the name of the warning, to give users encountering this the best possible chance to figure out what has changed (and that it was us, and not something that they did).

@prashant1221
Copy link

Will this PR be merged in 3.10? Can we resolve the issues.

@encukou
Copy link
Member

encukou commented Jun 15, 2022

Sorry, I missed the notifications here :(

Do we add What's new entries for point releases? I don't think I've seen one, but then I usually only read What's New for the .0 version.

@prashant1221, what issues are you having? Do you actually use mailcap?

@prashant1221
Copy link

Sorry, I missed the notifications here :(

Do we add What's new entries for point releases? I don't think I've seen one, but then I usually only read What's New for the .0 version.

@prashant1221, what issues are you having? Do you actually use mailcap?

No, it was to close the CVE-2015-20107 in our distro, Fedora seems to have taken this patch on all python3 branches.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
@vstinner
Copy link
Member

Do we add What's new entries for point releases? I don't think I've seen one, but then I usually only read What's New for the .0 version.

Yes, we do, especially for security fixes. Recent example: https://docs.python.org/dev/whatsnew/3.9.html#notable-changes-in-python-3-9-2

@vstinner
Copy link
Member

@encukou: Oh, this PR is not merged yet! Python 3.10 is still vulnerable, as older Python versions (3.7, 3.8 and 3.9 which still accept security fixes).

Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added what's new text and bumped the versionchanged stuff to 3.10.8.

@encukou
Copy link
Member

encukou commented Sep 20, 2022

Sorry for dropping the ball – this was #29 on my TODO list, which ain't a good spot :(
Thanks for the ping.

@encukou encukou merged commit 96739bc into python:3.10 Sep 20, 2022
@miss-islington miss-islington deleted the backport-b9509ba-3.10 branch September 20, 2022 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants