Fix Narinfo corruption detection bug

The aim of this check was just to ensure each key occurs once.
This commit is contained in:
John Ericson 2020-07-02 21:44:18 +00:00
parent 987a4a0be9
commit 1be279af26

View file

@ -66,7 +66,7 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
else if (name == "Sig")
sigs.insert(value);
else if (name == "CA") {
if (!value.empty()) throw corrupt();
if (ca) throw corrupt();
// FIXME: allow blank ca or require skipping field?
ca = parseContentAddressOpt(value);
}