Skip to content
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

Show a warning or error for invalid names #327

Open
Arachnid opened this issue May 18, 2019 · 6 comments

Comments

@Arachnid
Copy link
Member

commented May 18, 2019

Reported here: https://discuss.ens.domains/t/non-compliant-name-on-official-lookup-https-manager-ens-domains-name-rainbow-eth/992

https://manager.ens.domains/name/%F0%9F%8C%88rainbow.eth is not a valid name per nameprep, but we don't show any indication of that.

We should probably still show the user the info on the name, but with a large warning at the top that the name is not valid and will not resolve in browsers/wallets etc.

This also relates to our behaviour for #282 - when someone looks up a non-normalised name, we should redirect them to the normalised version, and show an alert that this happened, offering them a way to view the original non-normalised version.

@Arachnid

This comment has been minimized.

Copy link
Member Author

commented May 20, 2019

I just checked, and this name does pass uts-46 normalisation, which ENS uses. IDNA also uses uts-46, but it must be using a more restrictive set of permitted characters.

Nevertheless, we need to improve our handling of invalid or non-normal names.

@joshuawu

This comment has been minimized.

Copy link

commented May 20, 2019

UTS-46 normalisation is part of the IDNA protocol. So for UTS-46 to make any sense, ENS needs to adhere to the IDNA standard.
You can read more about UTS-46/IDNA here: https://unicode.org/reports/tr46/
Since 2003 the set of valid codepoints has been defined as the union of CONTEXTJ, CONTEXTO, and PVALID under any version of Unicode from 5.2 on. Presently this means that emoji are definitely illegal, and any compliant registrar will not accept emojis.
The reasoning behind excluding emojis is described in this advisory from ICANN: https://www.icann.org/en/system/files/files/sac-095-en.pdf

@Arachnid

This comment has been minimized.

Copy link
Member Author

commented May 21, 2019

UTS-46 normalisation is part of the IDNA protocol. So for UTS-46 to make any sense, ENS needs to adhere to the IDNA standard.

I don't think this is true. UTS-46 is part of IDNA, but that doesn't mean that UTS-46 is meaningless without the rest of IDNA.

For anyone else reading, the rest of our conversation is here: https://discuss.ens.domains/t/non-compliant-name-on-official-lookup-https-manager-ens-domains-name-rainbow-eth/992/11

@kclowes

This comment has been minimized.

Copy link

commented May 31, 2019

@Arachnid I'm working on standardizing the web3py ENS module to the manager. I've been reading through the UTS46 spec and EIP137, and I am a little confused. EIP137 says:

Labels and domains may be of any length, but for compatibility with legacy DNS, it is recommended that labels be restricted to no more than 64 characters each, and complete ENS names to no more than 255 characters. For the same reason, it is recommended that labels do not start or end with hyphens, or start with digits.

I take this to mean that these are recommendations, not rules. Yet, https://manager.ens.domains enforces that names are at least 7 characters, and don't start or end with hyphens. Starting with a number is acceptable in the manager. However, AIUI, UTS46 only optionally enforces the hyphens, and optionally enforces that the label length is between 1-63. Does the EIP need to be updated to include these restrictions, or is there a reason it doesn't have stricter language? Also, is there somewhere I can reference a list of restrictions from the manager? Thanks!

@Arachnid

This comment has been minimized.

Copy link
Member Author

commented Jun 2, 2019

Yet, https://manager.ens.domains enforces that names are at least 7 characters, and don't start or end with hyphens. Starting with a number is acceptable in the manager. However, AIUI, UTS46 only optionally enforces the hyphens, and optionally enforces that the label length is between 1-63.

The limitation of 7 characters should only be on .eth, and is specific to the manager. I'd like to remove it entirely.

In general, any ways in which the manager deviates from UTS-46 are a bug in the manager, not in EIP 137. Please treat 137 as authoritative here.

@kclowes

This comment has been minimized.

Copy link

commented Jun 3, 2019

Great, that is what I needed to know! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.