-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [audit] ZNS-1, ZNS-2, vulnerability due to lack of string validation #61
Merged
Conversation
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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## development #61 +/- ##
============================================
Coverage 99.79% 99.79%
============================================
Files 11 11
Lines 493 498 +5
Branches 123 124 +1
============================================
+ Hits 492 497 +5
Misses 1 1 |
Whytecrowe
changed the title
Audit fix: ZNS-2, vulnerability due to lack of string validation
fix: [audit] ZNS-2, vulnerability due to lack of string validation
Oct 25, 2023
Whytecrowe
changed the title
fix: [audit] ZNS-2, vulnerability due to lack of string validation
fix: [audit] ZNS-1, ZNS-2, vulnerability due to lack of string validation
Oct 26, 2023
Whytecrowe
reviewed
Oct 30, 2023
Whytecrowe
reviewed
Oct 30, 2023
Whytecrowe
reviewed
Oct 30, 2023
Whytecrowe
reviewed
Oct 30, 2023
Whytecrowe
reviewed
Oct 30, 2023
…hen registering, add comments
fix: [audit] ZNS-1, ZNS-2, vulnerability due to lack of string validation
🚨 Vulnerabilities Summary
For more details view the full report in OpenZeppelin Code |
🎉 This PR is included in version 0.6.7 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
String validation now exists to only allow domain names to be alphanumeric characters that match
[a-z0-9-]
By adding this, creating a single domain or subdomain with the name
0://wilder.2ld.3ld.4ld
is not possible because the.
character does not match this pattern. Any domain name that includes a.
, a capital letter, or any special character like!()@#$%^&*?
is not valid. We also no longer allow unicode characters for special things like emojis or letters with accent marks.Validation function exists in
StringUtils
libraryThis addresses ZNS-1 in a way as well. Spoofing is still possible because people can mint domains like
w1lder
andwild3r
which can't really stopped entirely unless we also disallow numbers. This change does, however, address capital letters and other possibly abusable special characters so domains likeWilder
can't be created