-
Notifications
You must be signed in to change notification settings - Fork 3
Validator UI Update #366
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
Validator UI Update #366
Conversation
| return false; | ||
| } | ||
| for (const elem of elems) { | ||
| const num = parseInt(elem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of parseInt without specifying a radix can lead to unexpected results if the input contains leading zeros, as these might be interpreted as octal numbers. To ensure consistent behavior, always specify a radix of 10 when using parseInt for IP address segments.
Recommended Change:
const num = parseInt(elem, 10);| } | ||
|
|
||
| // Check if host is a valid domain name | ||
| const domainRegex = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regular expression used for domain name validation does not support internationalized domain names (IDNs) which can include Unicode characters. This limitation might prevent valid IDNs from being accepted.
Recommended Change:
Consider using a library or a more comprehensive regular expression that supports IDNs to enhance the domain name validation process.
older version of macos is required to build executable for intel based cpu.
No description provided.