Page MenuHomePhabricator

[keyserver] Introduce `isValidEthereumAddress`
ClosedPublic

Authored by atul on Dec 24 2022, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 9:53 AM
Unknown Object (File)
Wed, Dec 18, 6:18 PM
Unknown Object (File)
Wed, Dec 18, 6:18 PM
Unknown Object (File)
Wed, Dec 18, 6:18 PM
Unknown Object (File)
Sat, Nov 30, 5:53 AM
Unknown Object (File)
Thu, Nov 28, 10:34 PM
Unknown Object (File)
Nov 21 2024, 5:17 AM
Unknown Object (File)
Nov 8 2024, 4:18 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.