-
Notifications
You must be signed in to change notification settings - Fork 79
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
Project name validation #635
Conversation
hm.. seems like some CI checks are failing. I'm looking into this. |
packages/aragon-cli/src/util.js
Outdated
* @returns {boolean} `true` if valid | ||
*/ | ||
function isValidEnsName(name) { | ||
return /^[a-z0-9]+$/.test(name) |
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.
@macor161 ENS allow the use of the -
symbol as well (e.g. aragon-app
is a valid name).
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.
Yes I was wondering whether to add the hyphen or not, since it is not accepted in the main onboarding app (app.aragon.org). Is there an official documentation where I can find the accepted chars for Aragon subdomains? Maybe I should also rename the function to isValidAragonSubdomainName()
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.
You are right about that. Nevertheless in that cause those are to link a dao to an aragonId
. We are creating a subdomain in the open.aragonpm.eth
registrar for Aragon apps. You think we should also stick to not use the hyphen?
Sorry I went ahead and made the changes 😅
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 choice to not use the hyphen is a purely arbitrary decision made by us, and not an ENS limitation. You can use any IRI (including emojis, etc.).
The frontend actually accepts this regex for self-assigned ENS names. Note that again, it is still a subset of possible ENS names, but it was chosen to avoid potential spoofing attacks on the frontend with unicode characters.
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.
🦅 Pull Request
Closes #147. Displays an error during initialization when project name contains invalid chars.
🚨 Test instructions
aragon init my_app_name
or
create-aragon-app my_app_name
✔️ PR Todo