Page MenuHomePhabricator

[keyserver] Introduce `isValidEthereumAddress`
ClosedPublic

Authored by atul on Dec 24 2022, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 4:18 PM
Unknown Object (File)
Fri, Nov 8, 4:17 PM
Unknown Object (File)
Fri, Nov 8, 4:17 PM
Unknown Object (File)
Fri, Nov 8, 3:48 PM
Unknown Object (File)
Fri, Nov 8, 3:48 PM
Unknown Object (File)
Tue, Nov 5, 4:20 AM
Unknown Object (File)
Thu, Oct 24, 1:14 AM
Unknown Object (File)
Oct 4 2024, 6:29 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
Branch
arcpatch-D6029 (branched from master)
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.