mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve ValidatorList invalid UNL manifest logging (#5804)
This change raises logging severity from `INFO` to `WARN` when handling UNL manifest signed with an unexpected / invalid key. It also changes the internal error code for an invalid format of UNL manifest to `invalid` (from `untrusted`). This is a follow up to problems experienced by an UNL node due to old manifest key configured in `validators.txt`, which would be easier to diagnose with improved logging. It also replaces a log line with `UNREACHABLE` for an impossible situation when we match UNL manifest key against a configured key which has an invalid type (we cannot configure such a key because of checks when loading configured keys).
This commit is contained in:
@@ -768,6 +768,24 @@ private:
|
||||
expectUntrusted(lists.at(7));
|
||||
expectTrusted(lists.at(2));
|
||||
|
||||
// try empty or mangled manifest
|
||||
checkResult(
|
||||
trustedKeys->applyLists(
|
||||
"", version, {{blob7, sig7, {}}, {blob6, sig6, {}}}, siteUri),
|
||||
publisherPublic,
|
||||
ListDisposition::invalid,
|
||||
ListDisposition::invalid);
|
||||
|
||||
checkResult(
|
||||
trustedKeys->applyLists(
|
||||
base64_encode("not a manifest"),
|
||||
version,
|
||||
{{blob7, sig7, {}}, {blob6, sig6, {}}},
|
||||
siteUri),
|
||||
publisherPublic,
|
||||
ListDisposition::invalid,
|
||||
ListDisposition::invalid);
|
||||
|
||||
// do not use list from untrusted publisher
|
||||
auto const untrustedManifest = base64_encode(makeManifestString(
|
||||
randomMasterKey(),
|
||||
|
||||
Reference in New Issue
Block a user