Giter Site home page Giter Site logo

dns.hosts(0): invalid hostname about ftl HOT 4 CLOSED

asdf4w3t5 avatar asdf4w3t5 commented on July 17, 2024
dns.hosts(0): invalid hostname

from ftl.

Comments (4)

DL6ER avatar DL6ER commented on July 17, 2024

The forum post was about capital letters being rejected, we fixed this.

It is validating domains I have entered months ago and saying they are wrong

The issue you are reporting is about a TLD with a length of one whereas the minimum enforced length is 2:

// TLD length check
// The last label must be at least 2 characters long
// (len-1) because we start counting from zero
if((len - 1) - last_dot < 2)
return false;

following https://data.iana.org/TLD/tlds-alpha-by-domain.txt which does not list a single one-character TLD.

However, I do agree with you that users may define such TLDs locally so we should relax this as well. Nonetheless, I want to advise against using TLDs that are not defined in the wild for you private use. Imagine they get defined at some point in the future and suddenly some of your internal configurations become problematic. This threat is not hypothetical as we have seen more recently where a malicious party has registered fritz.box where this is the host name of a lot of popular routers out in the wild.

from ftl.

DL6ER avatar DL6ER commented on July 17, 2024

Also, looking at the title of this PR:

dns.hosts[0]: invalid hostname

will have shown you where to look. It means that the zeroth element was causing the validation issue.

from ftl.

asdf4w3t5 avatar asdf4w3t5 commented on July 17, 2024

The forum post was about capital letters being rejected, we fixed this.

yes that is how I was able to say it is unrelated

This issue did not occur until I updated yesterday. Last time I updated was a month ago or so

will have shown you where to look. It means that the zeroth element was causing the validation issue.

So I should have fixed it?

However, I do agree with you that users may define such TLDs locally so we should relax this as well. Nonetheless, I want to advise against using TLDs that are not defined in the wild for you private use. Imagine they get defined at some point in the future and suddenly some of your internal configurations become problematic. This threat is not hypothetical as we have seen more recently where a malicious party has registered fritz.box where this is the host name of a lot of popular routers out in the wild.

corporate infrastructure will probably never not have random domains with 1 letters

This threat is not hypothetical as we have seen more recently where a malicious party has registered fritz.box where this is the host name of a lot of popular routers out in the wild.

That's good they did that, routers should stop with having names at all.

I'd be glad if they actually made single letter TLDs but I doubt it
and even more glad if they took away the period like it used to be and just have names. but I guarantee that one won't happen lol

from ftl.

DL6ER avatar DL6ER commented on July 17, 2024

So I should have fixed it?

No, I mean you could have found it more easily. We still agreed on that this is worth changing. The one-letter TLD validation has been merged and this won't happen again so I'll code this ticket.

from ftl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.