mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 15:56:18 +02: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
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue