HomePhabricator
Diffusion Comm 4c73fbabf863

[keyserver] Introduce `isValidEthereumAddress`

Description

[keyserver] Introduce isValidEthereumAddress

Summary:
Simple RegEx sanity check to ensure that the address is a well formed ethereum address.

Use utility in siweAuthResponder to throw a ServerError if address fails isValidEthereumAddress check. (Will be used in isValidSIWEMessage instead.)


Depends on D6028

Test Plan: Unit tests and tried calling endpoint with correct and incorrectly formed addresses.

Reviewers: ashoat, tomek

Reviewed By: ashoat

Differential Revision: https://phab.comm.dev/D6029

Details

Provenance
atulAuthored on Dec 27 2022, 12:41 AM
Reviewer
ashoat
Differential Revision
D6029: [keyserver] Introduce `isValidEthereumAddress`
Parents
rCOMMc322654268c3: [native] Modify `SIWEPanel` to hit `siwe_auth` endpoint once SIWE message is…
Branches
Unknown
Tags
Unknown