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

Revert "module: preserve symlinks when requiring" #6536

Closed
wants to merge 2 commits into from

Conversation

saper
Copy link

@saper saper commented May 2, 2016

After much discussion, it seems that the change
broke the way require detects unique identity of
the binary modules. While resolving module's
full path is not sufficient and maybe even
not elegant (like anything that requires the use
of realpath() except for certain security scenarios),
we cannot break multiple inclusions of binary
modules across symlinked, substed or otherwise
hidden paths.

There should be a test case invoving a binary
module to check for issues related to the binary
module identity.

Revert #5950

This reverts commit de1dc0a.

After much discussion, it seems that the change
broke the way require detects unique identity of
the binary modules. While resolving module's
full path is not sufficient and maybe even
not elegant (like anything that requires the use
of realpath() except for certain security scenarios),
we cannot break multiple inclusions of binary
modules across symlinked, substed or otherwise
hidden paths.

There should be a test case invoving a binary
module to check for issues related to the binary
module identity.

This reverts commit de1dc0a.
@mscdex mscdex added the module Issues and PRs related to the module subsystem. label May 2, 2016
@jasnell
Copy link
Member

jasnell commented May 2, 2016

Already working on it: #6537

@saper
Copy link
Author

saper commented May 3, 2016

@jasnell I have added a test for the #5950 failure

@jasnell
Copy link
Member

jasnell commented May 3, 2016

+1, if you don't mind I'll cherry pick that into my PR

@saper saper force-pushed the master branch 2 times, most recently from 5ba41d8 to 3acde0d Compare May 3, 2016 00:59
Attempt to load the binary module disguised
behind two symlinked locations.

Big thanks to Michael Mifsud <[email protected]>
for preparing a proper test case.
@jasnell
Copy link
Member

jasnell commented May 3, 2016

@saper .. if you don't mind I'm going to close this one in favor of #6537. We can continue the work there. I got your test commit merged successfully but had a make a couple edits to make it work

@saper
Copy link
Author

saper commented May 12, 2016

I have restored this in #6721.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module Issues and PRs related to the module subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants