clone

a self-hosted multitenant nostr relay with sites, file storage, git hosting, and inbox and outbox delivery

fix(auth): validate payload hashes for empty request bodies

Dami committed 3d3a077
Check supplied NIP-98 payload hashes even when the request body is empty while preserving the hash requirement for nonempty bodies. Apply the same rule to deferred Git requests and cover empty, missing and mismatched payloads with ordinary regression tests.
commit
3d3a0772f99f7cd59282585ac5ed94b2cbfdf180
parent
d0a14b01e65dc0ca2eb9b4f8d2fff7f59add59c6
author
Dami <dami.etoile@gmail.com>
4 files changed, +70 -7
Minternal/daemon/git_payload.go16++++++++++++----
Minternal/daemon/git_payload_test.go25+++++++++++++++++++++++++
Mprotocol/auth/auth.go8+++++---
Mprotocol/auth/auth_test.go28++++++++++++++++++++++++++++
M internal/daemon/git_payload.go +12 -4
M internal/daemon/git_payload_test.go +25 -0
M protocol/auth/auth.go +5 -3
M protocol/auth/auth_test.go +28 -0