Page MenuHomePhabricator

[keyserver] Introduce `isValidEthereumAddress`
ClosedPublic

Authored by atul on Dec 24 2022, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 4, 1:56 PM
Unknown Object (File)
Sun, Jun 30, 10:39 PM
Unknown Object (File)
Tue, Jun 25, 6:39 AM
Unknown Object (File)
Tue, Jun 25, 1:02 AM
Unknown Object (File)
Mon, Jun 24, 1:06 AM
Unknown Object (File)
Fri, Jun 21, 11:18 PM
Unknown Object (File)
Fri, Jun 21, 9:52 PM
Unknown Object (File)
Fri, Jun 21, 9:52 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
Lint Not Applicable
Unit
Tests Not Applicable

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.