Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate message signature encoding #1070

Merged
merged 1 commit into from
Nov 29, 2021
Merged

Conversation

AdamISZ
Copy link
Member

@AdamISZ AdamISZ commented Nov 12, 2021

Fixes #1069.
Before this commit, a non-hex encoded pubkey sent
as part of the privmsg signature raised an Exception,
this commit fixes this, checking the encoding of both
the pubkey and signature fields before sending them
from daemon to client.

Copy link
Member

@kristapsk kristapsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 38888d1, code looks correct.

Fixes #1069.
Before this commit, a non-hex encoded pubkey sent
as part of the privmsg signature raised an Exception,
this commit fixes this, checking the encoding of both
the pubkey and signature fields before sending them
from daemon to client.
@AdamISZ AdamISZ force-pushed the check_msgsig_encoding branch from 38888d1 to 0507f6a Compare November 13, 2021 14:37
@AdamISZ
Copy link
Member Author

AdamISZ commented Nov 13, 2021

Changed in 0507f6a because of a dumb error (sig/pub reversal) in the on_privmsg parsing (In the internal AMP call we use sig, pub in the arguments, while in the actual message from the counterparty we have pub, sig. Because why not :) ).

I have tested a few regtest transactions with 0507f6a and I'm now confident it's correct.

Copy link
Member

@kristapsk kristapsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 0507f6a. Checked diff between commits, test suite passes, did successful signet coinjoin. Merging.

@kristapsk kristapsk merged commit 8854f68 into master Nov 29, 2021
@AdamISZ AdamISZ deleted the check_msgsig_encoding branch November 30, 2021 16:36
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.

binascii.Error: Non-hexadecimal digit found during sendpayment
2 participants