Skip to content

Conversation

@alltheseas
Copy link
Contributor

problem

ndk does not validate inbound profile/kind0 events

suggested solution

  • Always treat kind‑0 events as must‑verify: bypass sampling/trust and enforce synchronous signature checks so invalid profiles are dropped immediately.
    • Reuse verifyAndReport for both relay/no‑relay paths; add early returns to keep control flow simple.
    • Preserve existing behavior for other kinds (sampling + optional async verification).

context

discovered lack of profile validation via yakihonne-web: nostrability/nostrability#262 (comment)
closes #359

Closes: nostr-dev-kit#359

Signed-off-by: alltheseas <64376233+alltheseas@users.noreply.github.com>
Signed-off-by: alltheseas <64376233+alltheseas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add signature validation for inbound profile/kind0 events

1 participant