mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-11 07:12:36 +00:00
feat: add fuzz testing harness and fix repost builder
- Created generic fuzzing library `scripts/agent/fuzz-lib.mjs`. - Implemented fuzz targets for `nostrEventSchemas.js`, `dmDecryptor.js`, and `magnetUtils.js`. - Fixed `buildRepostEvent` to allow missing relay URLs for robustness. - Added crash reproducers to `examples/reproducers/`.
This commit is contained in:
1 parent
5726997475
commit
5c2e9cd7f8
26 files changed
+1041
-3
No files matched your search
@@ -865,10 +865,11 @@ export function buildRepostEvent(params) {
|
||||
typeof eventRelay === "string" ? eventRelay.trim() : "";
|
||||
|
||||
if (normalizedEventId) {
|
||||
if (!normalizedEventRelay) {
|
||||
throw new Error("missing-event-relay");
|
||||
if (normalizedEventRelay) {
|
||||
tags.push(["e", normalizedEventId, normalizedEventRelay]);
|
||||
} else {
|
||||
tags.push(["e", normalizedEventId]);
|
||||
}
|
||||
tags.push(["e", normalizedEventId, normalizedEventRelay]);
|
||||
}
|
||||
|
||||
const normalizedAddress = typeof address === "string" ? address.trim() : "";
|
||||
|
||||
Reference in new issue
Block a user