1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-10-18 14:32:45 -04:00
nix/tests/unit/libstore
Robert Hensing b5947b55e2 Disallow store path names that are . or .. (plus opt. -)
As discussed in the maintainer meeting on 2024-01-29.

Mainly this is to avoid a situation where the name is parsed and
treated as a file name, mostly to protect users.
.-* and ..-* are also considered invalid because they might strip
on that separator to remove versions. Doesn't really work, but that's
what we decided, and I won't argue with it, because .-* probably
doesn't seem to have a real world application anyway.
We do still permit a 1-character name that's just "-", which still
poses a similar risk in such a situation. We can't start disallowing
trailing -, because a non-zero number of users will need it and we've
seen how annoying and painful such a change is.

What matters most is preventing a situation where . or .. can be
injected, and to just get this done.

(cherry picked from commit f1b4663805)
2024-01-31 18:11:17 +00:00
..
data Create unit tests for the serve proto handshake 2024-01-22 12:43:11 -05:00
test-data
common-protocol.cc
derivation.cc
derived-path.cc
downstream-placeholder.cc
local.mk
machines.cc Convert Machine::speedFactor from a non-neg int to a non-neg float 2024-01-24 01:03:07 -05:00
nar-info-disk-cache.cc
nar-info.cc
outputs-spec.cc
path-info.cc
path.cc Disallow store path names that are . or .. (plus opt. -) 2024-01-31 18:11:17 +00:00
references.cc
serve-protocol.cc Shut up a gcc warning 2024-01-29 15:22:44 +01:00
worker-protocol.cc worker protocol: serialise cgroup stats in BuildResult (#9598) 2023-12-13 16:37:17 -05:00