Skip to content

fix(extension): resolve symlinks in containment check - #523

Open
margaretjgu wants to merge 2 commits into
mainfrom
fix/extension-symlink-containment
Open

fix(extension): resolve symlinks in containment check#523
margaretjgu wants to merge 2 commits into
mainfrom
fix/extension-symlink-containment

Conversation

@margaretjgu

Copy link
Copy Markdown
Member

assertWithinInstallDir compared resolve()d paths, which normalizes ./.. but doesn't follow symlinks, so a symlinked entrypoint inside the install directory passed the check while pointing anywhere on disk. Switches to realpath on both sides of the comparison and calls the check from createLocalExtension too (it previously only ran on the install path).

Closes #500.

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.

fix(extension): entrypoint containment check is bypassable via symlink

1 participant