Skip to content
Unverified Commit 3977f389 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/4ab078d6754147ce731523292dd1882f8a7b5775/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 42ddb5b0
Pipeline #480223 waiting for manual action with stages
in 1 hour, 18 minutes, and 2 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