-
-
Notifications
You must be signed in to change notification settings - Fork 683
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly manage
RFC 3986 authority domain
check (#2351)
* fix: properly manage `RFC 3986 authority domain` check ## PR overview Using the current regex expression only second level domains are accepted. However, that is not the way it is specified on RFC 3986. With the current implementation for instance all country code second-level domains (ccSLD) like domain.co.uk are not accepted. The fix allows multi-level domains. ### Detailed summary Changed `domainRegex` regex to allow multiple level domains. * Create rfc3986-authority-domain.md * Fix: Replace instead of adding * Update .changeset/rfc3986-authority-domain.md Co-authored-by: awkweb <tom@meagher.co> * test(siwe): sub/multi-level domains --------- Co-authored-by: awkweb <tom@meagher.co>
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"viem": patch | ||
--- | ||
|
||
Fixed `createSiweMessage` domain check to be RFC 3986 compliant. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters