Merge pull request #1822 from PR0M3TH3AN/ai/fuzz-robustness-20260127-16938882270581666950

Fuzz tests and robustness fixes for nostrEventSchemas, dmDecryptor, and magnetUtils
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-27 12:05:56 -05:00
commit faef22b94b
5 files changed
+112 -4

No files matched your search

+10 -1
View File
@@ -701,7 +701,16 @@ function resolveOverride(type) {
export function setNostrEventSchemaOverrides(overrides = {}) {
if (overrides && typeof overrides === "object") {
schemaOverrides = overrides;
try {
JSON.stringify(overrides);
schemaOverrides = overrides;
} catch (error) {
devLogger.warn(
"[nostrEventSchemas] Invalid overrides provided (circular structure?):",
error
);
schemaOverrides = {};
}
} else {
schemaOverrides = {};
}