mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-10-31 01:45:50 +08:00
[Fix] fix directory traversal when workdir path is not readable
This commit is contained in:
committed by
Jordan Harband
parent
44e1d9c911
commit
0d9b5c2a00
@@ -31,3 +31,6 @@ ACTUAL="$(PWD=$TEST_DIR/no-nesting-n_m nvm_find_project_dir)"
|
||||
|
||||
ACTUAL="$(PWD=$TEST_DIR/no-nesting-pkg nvm_find_project_dir)"
|
||||
[ "${ACTUAL}" = "$TEST_DIR/no-nesting-pkg" ] || die "no-nesting-pkg: got ${ACTUAL}"
|
||||
|
||||
ACTUAL="$(PWD="." nvm_find_project_dir)"
|
||||
[ "${ACTUAL}" = "." ] || die "insufficient permissions for pwd: got ${ACTUAL}"
|
||||
|
||||
Reference in New Issue
Block a user