Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: checking if symlink with same prefix points outside the directory #335

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

mmaietta
Copy link
Contributor

If a directory is pointed to by a symbolic link whose name is the prefix of the directory, the directory won't be included in the asar. For example, the directory aa won't be included.

├── a -> aa
└── aa

Added a check (and test case) to see if the symlink is actually to a different directory and not a file (e.g. startsWith) within the symlinked dir. New test case mirrors test/input/packthis-with-symlink but with the symlink having the same prefix of a directory outside the symlink

Fixes: #303

@mmaietta mmaietta changed the title fix: checking if symlink points outside the directory fix: checking if symlink with same prefix points outside the directory Oct 23, 2024
@mmaietta mmaietta marked this pull request as ready for review October 23, 2024 17:08
@mmaietta mmaietta requested a review from a team as a code owner October 23, 2024 17:08
Copy link
Member

@BlackHole1 BlackHole1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmaietta
Copy link
Contributor Author

Thanks @BlackHole1 ! Would you mind also taking a look at this PR? It's the same style of fix but for asar unpacking: #333

@BlackHole1
Copy link
Member

BlackHole1 commented Oct 24, 2024

@mmaietta Already approved! Thank you for the fix you submitted!
In general, we do not merge PRs immediately (unless they are very simple or submitted by a bot for dependency updates). We usually wait a few days to allow other maintainers to provide their input.

@BlackHole1 BlackHole1 merged commit 9ec1830 into electron:main Nov 6, 2024
3 checks passed
@mmaietta mmaietta deleted the fix-symlink-same-dir-prefix branch November 6, 2024 18:23
Copy link

🎉 This PR is included in version 3.2.17 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Symlinked directories not included in asar
2 participants