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

Respect malformed .dist-info directories in tool installs #5756

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

charliermarsh
Copy link
Member

Summary

Closes #5749.

@charliermarsh charliermarsh added bug Something isn't working preview Experimental behavior labels Aug 3, 2024
@charliermarsh charliermarsh marked this pull request as ready for review August 3, 2024 23:23
@charliermarsh charliermarsh merged commit c5052bc into main Aug 3, 2024
57 checks passed
@charliermarsh charliermarsh deleted the charlie/babel branch August 3, 2024 23:43
@CoolCat467
Copy link

python-babel/babel#1110 fixed the original issue. While inconvenient, I personally think that respecting malformed .dist-info installation should be behind a flag or something instead of being default

@charliermarsh
Copy link
Member Author

I think it's arguably standards-incompliant to reject non-normalized dist-info directories.

@RomainBrault
Copy link

Putting this behavior behind a flag could be beneficial in terms of prevention of malicious typo-squatting.

Or maybe display a warning say more or less "The .dist-info is malformed. Be careful it might be malicious. If the package is legit please raise an issue to the authors/maintainers" ?

@charliermarsh
Copy link
Member Author

To be clear, we do error if the normalized filenames don't match. We just don't require that the name on the directory is normalized already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot install Babel
3 participants