Skip to content

reject drive-relative license-file paths in metadata validation - #1382

Open
rajath201 wants to merge 1 commit into
pypa:mainfrom
rajath201:license-file-drive-relative
Open

reject drive-relative license-file paths in metadata validation#1382
rajath201 wants to merge 1 commit into
pypa:mainfrom
rajath201:license-file-drive-relative

Conversation

@rajath201

Copy link
Copy Markdown
Contributor

_process_license_files blocks absolute paths, backslashes, globs, and .., but a Windows drive-relative path like C:LICENSE or D:secrets/key.txt slips through since it has none of those and pathlib does not report it as absolute, yet ntpath.join(project_root, "D:evil.txt") resolves outside the project root, so reject any path carrying a drive at the same layer that rejects the other escapes.

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.

1 participant