Global Feed Post Login
Replying to Avatar Daniele

I was giving for granted that it behave that way, then today I made an integration test over my signup API to see taht it would fail under an "attack" with a modified event.

The test failed and I got scared so I did dig deeper and wrote that test.

The whole library assembles in the "finalized event" both the original event and the sig/pub/hash properties. So when you call verifyEvent it uses the hashes that one pass as "id" rather than recalculate the hash from scratch from the original event properties.

I am no security expert but that look *very* bad to me.

Avatar
Daniele 1y ago

TBC: the integration test "failed" means that the signup HTTP worked despite the modified event being sent through, while it should have returned 401.

Reply to this note

Please Login to reply.

Discussion

No replies yet.