-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
test: fix defect path traversal tests #50124
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Actually, I'm not 100% sure I understand the motivation of the change and would rather wait for Rafael to weigh in
The existing test seems to assume that const allowedFolder = tmpdir.resolve('subdirectory/'); keeps the trailing The other JavaScript file then constructs paths as follows: const traversalPath = allowedFolder + '../file.md'; Therefore, |
The test never actually tested what it claims to test because it did not properly insert separators before `..`.
e159f6e
to
953131a
Compare
Rebased due to a conflict with f447a46. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Landed in 0c56962 |
The test never actually tested what it claims to test because it did not properly insert separators before `..`. PR-URL: nodejs#50124 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
The test never actually tested what it claims to test because it did not properly insert separators before `..`. PR-URL: #50124 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
The test never actually tested what it claims to test because it did not properly insert separators before `..`. PR-URL: nodejs#50124 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
The test never actually tested what it claims to test because it did not properly insert separators before `..`. PR-URL: #50124 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
The test never actually tested what it claims to test because it did not properly insert separators before
..
.