matrix-construct / construct

This is The Construct

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid json unicode messages break stuff (Signature was forged or corrupt)

grinapo opened this issue · comments

(dumped from the channel; by davo)

Some messages can't federate due to invalid signature:

Invalid signature for server yetanothernerd.xyz with key ed25519:8fO1vxo5: Unable to verify signature for yetanothernerd.xyz: <class 'nacl.exceptions.BadSignatureError'> Signature was forged or corrupt ☹︎

I bet what's happening is that Construct is dumping strings it gets from clients as is, with no regard for whether they're valid canonical JSON (Unicode escapes and all).

link

Yes, it appears Synapse unescapes the unicode for its hash preimage. I think this was overlooked when working on #152.