Normalization keeps "_" character if it's first character
Kamigaku opened this issue · comments
Hello,
First of all, thanks for the libs, it is very useful.
I have done some testing on potential issues and the simple code below:
print(ens_normalize("_inkedupkids.eth"))
Returns me the following value:
_inkedupkids.eth
which is not a valid ens domain. If the underscore is later on the string, for example:
print(ens_normalize("inked_upkids.eth"))
It correctly detects an error and generate me a DisallowedLabelError.
The error is located in the post_check_underscore
function that doesn't handle well underscore who are at the start of a string.
Hi, thanks!
The name is normalized according to Raffy's resolver: https://adraffy.github.io/ens-normalize.js/test/resolver.html#_inkedupkids.eth
In his ENS Name Normalization Standard:
The Python implementation should behave the same like JavaScript implementation: https://github.com/adraffy/ens-normalize.js/tree/4873fbe6393e970e186ab57860cc59cbbb1fa162
Thanks for your answer but in the first link : https://app.ens.domains/name/_inkedupkids.eth linked in the page doesn't work and, as specified by the ens, give the following reason: Domain malformed. _inkedupkids.eth is not a valid domain.
ens.domains uses official/current/approved standard. This is an implementation of the new standard that has not yet been accepted.