mirror of
https://github.com/NixOS/nix.git
synced 2024-11-27 17:22:29 +00:00
Canonicalize binary caches with ‘/’ when one is missing
This checks if there is a trusted substituter with a slash, so trusting https://cache.nixos.org also implies https://cache.nixos.org/ is trusted.
This commit is contained in:
parent
6ed09cb8c2
commit
b9a00fd15b
@ -215,6 +215,8 @@ struct ClientSettings
|
||||
for (auto & s : ss)
|
||||
if (trusted.count(s))
|
||||
subs.push_back(s);
|
||||
else if (!hasSuffix(s, "/") && trusted.count(s + "/"))
|
||||
subs.push_back(s + "/");
|
||||
else
|
||||
warn("ignoring untrusted substituter '%s'", s);
|
||||
res = subs;
|
||||
|
Loading…
Reference in New Issue
Block a user