Skip to content

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

Merged
charliermarsh merged 1 commit intomainfrom
charlie/babel
Aug 3, 2024
Merged

Respect malformed .dist-info directories in tool installs#5756
charliermarsh merged 1 commit intomainfrom
charlie/babel

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
@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