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

No abort on require() with null bytes #14905

Closed
wants to merge 2 commits into from

Conversation

saper
Copy link

@saper saper commented Aug 17, 2017

Followup-To: #8277

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system. module Issues and PRs related to the module subsystem. labels Aug 17, 2017
@cjihrig
Copy link
Contributor

cjihrig commented Aug 17, 2017

Related to #14854?

@saper
Copy link
Author

saper commented Aug 17, 2017

#14854 fixes #13787 which is a NUL byte in the path. Here we are concerned about NUL bytes in the file itself, for example it being a directory.

@bnoordhuis
Copy link
Member

Here we are concerned about NUL bytes in the file itself, for example it being a directory.

I don't understand this comment. Why are nul bytes in a file relevant? InternalModuleReadFile() reads blocks, not strings.

@BridgeAR
Copy link
Member

@saper thanks for following up on the mentioned PR but do you have a failing test case that is not covered by #14854? The mentioned PR got merged in the meanwhile and as far as I can tell this is currently redundant. So please add such a test case, otherwise we might go ahead and close this.

@saper
Copy link
Author

saper commented Aug 26, 2017

Even the included test case fails for me. I just wanted to rebase that one, please continue discussion in #8277, thanks!

@BridgeAR
Copy link
Member

@saper I just checked and all test cases work fine after fixing the ReferenceError to expectedError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system. module Issues and PRs related to the module subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants