better validation on pubkeys
This commit is contained in:
parent
3ca9edeee6
commit
9e857e6329
1 changed files with 1 additions and 1 deletions
|
|
@ -114,7 +114,7 @@ async def api_address_create(
|
|||
status_code=HTTPStatus.NOT_FOUND, detail="Local part already exists."
|
||||
)
|
||||
|
||||
if len(data.pubkey) != 64:
|
||||
if len(bytes.fromhex(data.pubkey)) != 32:
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.NOT_FOUND, detail="Pubkey must be in hex format."
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue