Merge pull request #5709 from nrdxp/fix-subflake-path-check

Fix parent path check boundary
This commit is contained in:
Eelco Dolstra 2021-12-02 13:15:52 +01:00 committed by GitHub
commit b42c1bea42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,7 +97,7 @@ struct PathInputScheme : InputScheme
// for security, ensure that if the parent is a store path, it's inside it
if (store->isInStore(parent)) {
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);
}
} else