Jump to content

"hostname" When Ordering Through Solusvm Accepts Non-Valid Hostname


Jonathan

Recommended Posts

Looks like there's no checking here for a valid hostname.

 

"google.com" is not a valid hostname for the purposes of a Linux server's hostname.

 

"host.google.com" is.

 

This causes some issues with many things inside of a VPS such as cPanel being a big one.  cPanel will not recognize a raw domain name as a hostname.

Link to comment
Share on other sites

A regex could be written for a rule for hostname to require something.something.something, but the issue would still exist in multi-level TLDs. For example, someone would be able to enter domain.co.uk and pass the validation. A more complex solution would be capable of identifying such cases, but I think only if compared against an exhaustive list of TLDs. Considering the list of TLDs is growing significantly, I'd be hesitant to build in such a limitation.

Link to comment
Share on other sites

Regex would be a fine solution for the most part but I don't think there's a way to create my own regex rules on top of the Solus module's fields, at least not that I'm seeing?

 

I believe it would require the module be updated to use the regex. The module defines rule validation for fields, so that's where it would need to be. Tyson may have more information.

 

I found this discussion while googlin regex fqdn - http://stackoverflow.com/questions/11809631/fully-qualified-domain-name-validation

 

They discuss the issue I raised with multi-level TLDs.

Link to comment
Share on other sites

The hostname validation is more of a best-effort approach. I don't see a way to validate a hostname with complete accuracy without knowledge of all TLDs. Perhaps it can be improved to be more accurate as long as it does not become restrictive.

 

I think Blesta uses the same validation check on hostnames throughout the system, in plugins, modules, etc., so it wouldn't be isolated to just SolusVM.

Link to comment
Share on other sites

my vote goes to a regix for something.something.something even if is (domain.uk.co) .

the second vote goes to what mike suggest ,with a little change , remplace the dropdown with a text field , that way the client can enter any tld or cctld

[text_imput=for prefix+domain] . [text_imput= for tld or CCTLD]

Link to comment
Share on other sites

  • 2 weeks later...

This will be updated in 3.5 as apart of CORE-1716.

 

Nice. I'll make sure to make use of that function when it gets released in my dedicated server module. :P

 

For now I think I'll figure out something with the existing solusvm hostname validator. It'll be nice to transition to one that's validated in the solusvm module.

Link to comment
Share on other sites

Nice. I'll make sure to make use of that function when it gets released in my dedicated server module. :P

 

For now I think I'll figure out something with the existing solusvm hostname validator. It'll be nice to transition to one that's validated in the solusvm module.

 

The update is rather simple, requiring another octet to be set for validation. Instead of validating 2+ octets, it's 3+.

Link to comment
Share on other sites

  • 3 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...