1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-22 17:01:08 +01:00
nix/src
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
..
build-remote Factor out Machine::systemSupported 2024-01-23 12:53:51 -05:00
libcmd DerivationInfo -> PackageInfo 2024-01-16 15:28:03 +01:00
libexpr Resolve symlinks in a few more places 2024-01-30 16:10:21 +00:00
libfetchers fetchTree/fetchGit: re-enable shallow fetching 2024-01-19 20:30:47 +07:00
libmain Use buildprefix in a few more places 2023-11-29 19:49:07 -05:00
libstore Disallow store path names that are . or .. (plus opt. -) 2024-01-31 18:11:17 +00:00
libutil Fix formatting of hash args 2024-01-29 17:50:25 +01:00
nix nix hash convert: Add manpage 2024-01-29 17:51:01 +01:00
nix-build DerivationInfo -> PackageInfo 2024-01-16 15:28:03 +01:00
nix-channel Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
nix-collect-garbage Split up util.{hh,cc} 2023-11-05 12:20:02 -05:00
nix-copy-closure Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
nix-env DerivationInfo -> PackageInfo 2024-01-16 15:28:03 +01:00
nix-instantiate DerivationInfo -> PackageInfo 2024-01-16 15:28:03 +01:00
nix-store Factor our ServeProto::BasicServerConnection::handshake 2024-01-22 12:43:11 -05:00
resolve-system-dependencies Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00