mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 20:16:03 +01:00
Merge pull request #5709 from nrdxp/fix-subflake-path-check
Fix parent path check boundary
This commit is contained in:
commit
b42c1bea42
1 changed files with 1 additions and 1 deletions
|
|
@ -97,7 +97,7 @@ struct PathInputScheme : InputScheme
|
||||||
// for security, ensure that if the parent is a store path, it's inside it
|
// for security, ensure that if the parent is a store path, it's inside it
|
||||||
if (store->isInStore(parent)) {
|
if (store->isInStore(parent)) {
|
||||||
auto storePath = store->printStorePath(store->toStorePath(parent).first);
|
auto storePath = store->printStorePath(store->toStorePath(parent).first);
|
||||||
if (!isInDir(absPath, storePath))
|
if (!isDirOrInDir(absPath, storePath))
|
||||||
throw BadStorePath("relative path '%s' points outside of its parent's store path '%s'", path, storePath);
|
throw BadStorePath("relative path '%s' points outside of its parent's store path '%s'", path, storePath);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue