Skip to content

Conversation

@YairHalberstadt
Copy link

Currently this fails because RealPath checks that a path is local to the basepath by seeing if it's cleaned prefix starts with the basepath.

This doesn't work when the basepath is "." because Clean removes the "." prefix from the full path.

Instead we use a more robust check using Rel and IsLocal.

Also we remove the superflous call to Clean since Join already calls Clean on the result.

Currently this fails because RealPath checks that a path is local to the basepath by seeing if it's cleaned prefix starts with the basepath.

This doesn't work when the basepath is "." because Clean removes the "." prefix from the full path.

Instead we use a more robust check using Rel and IsLocal.

Also we remove the superflous call to Clean since Join already calls Clean on the result.
@CLAassistant
Copy link

CLAassistant commented Nov 20, 2025

CLA assistant check
All committers have signed the CLA.

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.

2 participants