Page MenuHomePhabricator

[keyserver] Introduce `isValidEthereumAddress`
ClosedPublic

Authored by atul on Dec 24 2022, 7:58 PM.
Tags
None
Referenced Files
F2894688: D6029.diff
Fri, Oct 4, 4:32 PM
Unknown Object (File)
Wed, Oct 2, 12:10 PM
Unknown Object (File)
Wed, Oct 2, 9:32 AM
Unknown Object (File)
Wed, Oct 2, 6:02 AM
Unknown Object (File)
Wed, Oct 2, 5:09 AM
Unknown Object (File)
Wed, Oct 2, 5:08 AM
Unknown Object (File)
Wed, Oct 2, 4:43 AM
Unknown Object (File)
Thu, Sep 26, 10:41 PM
Subscribers
None

Details

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.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.Dec 24 2022, 8:13 PM
This revision is now accepted and ready to land.Dec 25 2022, 7:24 PM
atul retitled this revision from [keyserver] Introduce `isValidEthereumAddress` and use it to validate `address` in `siweAuthResponder` to [keyserver] Introduce `isValidEthereumAddress`.Dec 27 2022, 12:42 AM
atul edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Dec 27 2022, 12:45 AM
This revision was automatically updated to reflect the committed changes.