You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Names minter contract forbids "--" at 2-4 position of name due to DNS spec. https://github.com/public-awesome/names/blob/main/contracts/name-minter/src/contract.rs#L307
This restriction is in there by reason - this space is reserved for identifying that name is punycode encoded (basically that it contains unicode like emojis).
By just forbidding to put -- there, we also forbid using punycode (aka use emojis in names, etc).
We need to forbid only if it doesn't start from "xn--", so if it is not punycode.
So we basically need to add one more condition to if statement: !name[0..4].contains("xn--").
It will allow emoji names/domains, however not breaking DNS spec as punycode is fully supported there.
The text was updated successfully, but these errors were encountered:
Names minter contract forbids "--" at 2-4 position of name due to DNS spec.
https://github.com/public-awesome/names/blob/main/contracts/name-minter/src/contract.rs#L307
This restriction is in there by reason - this space is reserved for identifying that name is punycode encoded (basically that it contains unicode like emojis).
By just forbidding to put -- there, we also forbid using punycode (aka use emojis in names, etc).
We need to forbid only if it doesn't start from "xn--", so if it is not punycode.
So we basically need to add one more condition to if statement:
!name[0..4].contains("xn--")
.It will allow emoji names/domains, however not breaking DNS spec as punycode is fully supported there.
The text was updated successfully, but these errors were encountered: