馃寪 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

馃悰 fix(create): validate resolved destination paths - #3399

Merged
gaborbernat merged 3 commits into
pypa:mainfrom
gaborbernat:fix/resolved-destination-separator
Oct 16, 2026
Merged

gaborbernat merged 3 commits into
pypa:mainfrom
gaborbernat:fix/resolved-destination-separator

Conversation

@gaborbernat

Copy link
Copy Markdown
Contributor

Relative destinations could pass validation even when their absolute path contained the platform's PATH separator. 馃悰 An environment created as env beneath a directory containing : on POSIX or ; on Windows could then produce an activation PATH that split the environment directory into separate entries.

Validate the path used by activation

The previous validation checked only the supplied argument before resolving it. The fix checks both the supplied path and the resolved destination, covering separators inherited from the working directory or a directory symlink.

Behavior changes

Virtualenv now rejects these destinations before creating the environment and reports the path containing the separator. Choose a destination whose resolved path contains no PATH separator. The existing rejection of separators supplied directly in the argument remains in place.

@gaborbernat
gaborbernat merged commit 384dd9f into pypa:main Oct 16, 2026
76 checks passed
@gaborbernat
gaborbernat deleted the fix/resolved-destination-separator branch October 17, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant