forked from lix-project/lix
Fix parent path check boundary
- Previous to this commit the boundary was exclusive of the top level flake. - This is wrong since the top level flake is still a valid relative reference. - Now, the check boundary is inclusive of the top level flake. Signed-off-by: Timothy DeHerrera <tim.deh@pm.me>
This commit is contained in:
parent
782837d934
commit
7489811736
|
@ -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…
Reference in a new issue