better validation on pubkeys

This commit is contained in:
Lee Salminen
2022-12-20 07:14:03 -06:00
parent 3ca9edeee6
commit 9e857e6329
+1 -1
View File
@@ -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."
)