Skip to content
Unverified Commit 7eaba407 authored by georgepisaltu's avatar georgepisaltu Committed by GitHub
Browse files

[Identity] Remove double encoding username signature payload (#4646)

In order to receive a username in `pallet-identity`, users have to,
among other things, provide a signature of the desired username. Right
now, there is an [extra encoding
step](https://github.com/paritytech/polkadot-sdk/blob/4ab078d6

/substrate/frame/identity/src/lib.rs#L1119)
when generating the payload to sign.

Encoding a `Vec` adds extra bytes related to the length, which changes
the payload. This is unnecessary and confusing as users expect the
payload to sign to be just the username bytes. This PR fixes this issue
by validating the signature directly against the username bytes.

---------

Signed-off-by: default avatargeorgepisaltu <[email protected]>
parent 9b764923
Pipeline #480186 waiting for manual action with stages
in 1 hour, 7 minutes, and 20 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment