Files
lix/doc/manual/rl-next/checkSourcePath-purity-regression.md
T
Alois Wohlschlager 9d99a7c2cf libexpr: fix checkSourcePath purity regression
Starting with commit 0dbfa7b26e access would also
be allowed to ancestors of allowed paths. This is (ironically) a significant
purity regression, since several users of the purity checks will themselves
assume that arbitrary descent is allowed. For example, `builtins.readDir` and
`builtins.path` could now refer to the filesystem root, breaking purity
entirely in the latter case by allowing to read arbitrary files. Restore the
previous behaviour of only allowing access to explicitly allowed paths.

Change-Id: Ie64180733ab735da9873255e1ccbf95ba7c9161c
2025-03-02 18:30:30 +01:00

465 B

synopsis, category, cls, credits
synopsis category cls credits
Forbid impure path accesses in pure evaluation mode again Fixes
2708
alois31

Lix 2.92.0 mistakenly started allowing the access to ancestors of allowed paths in pure evaluation mode. This made it possible to bypass the purity restrictions, for example by copying arbitrary files to the store:

builtins.path {
  path = "/";
  filter = ;
}

Restore the previous behaviour of prohibiting such impure accesses.