lix/tests/unit/libstore
Robert Hensing b7ce11c97d 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 f1b4663805a9dbcb1ace64ec110092d17c9155e0)
Change-Id: I900a8509933cee662f888c3c76fa8986b0058839
2024-05-02 19:34:38 +02:00
..
data Don't run libstore unit tests in project root 2024-04-08 12:43:35 -07:00
common-protocol.cc import the revisions to the characterization test framework from cppnix 2024-03-11 14:14:43 -07:00
derivation.cc import the revisions to the characterization test framework from cppnix 2024-03-11 14:14:43 -07:00
derived-path.cc Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
downstream-placeholder.cc Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
local.mk Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
machines.cc Don't run libstore unit tests in project root 2024-04-08 12:43:35 -07:00
nar-info-disk-cache.cc Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
outputs-spec.cc Fix various clang-tidy lints 2024-03-29 20:26:38 -07:00
path.cc Disallow store path names that are . or .. (plus opt. -) 2024-05-02 19:34:38 +02:00
protocol.hh import the revisions to the characterization test framework from cppnix 2024-03-11 14:14:43 -07:00
references.cc Move tests to separate directories, and document 2023-12-01 13:05:03 -05:00
serve-protocol.cc import the revisions to the characterization test framework from cppnix 2024-03-11 14:14:43 -07:00
worker-protocol.cc import the revisions to the characterization test framework from cppnix 2024-03-11 14:14:43 -07:00