Jonathan Posted June 8, 2015 Report Share Posted June 8, 2015 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. PauloV 1 Link to comment Share on other sites More sharing options...
Paul Posted June 8, 2015 Report Share Posted June 8, 2015 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 More sharing options...
Jonathan Posted June 8, 2015 Author Report Share Posted June 8, 2015 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? Link to comment Share on other sites More sharing options...
Paul Posted June 8, 2015 Report Share Posted June 8, 2015 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. Michael 1 Link to comment Share on other sites More sharing options...
Tyson Posted June 8, 2015 Report Share Posted June 8, 2015 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 More sharing options...
Jonathan Posted June 8, 2015 Author Report Share Posted June 8, 2015 While not perfect, it would be more accurate to require at least two periods in this. So while domain.co.uk would technically pass, at least domain.com would not. It would be an improvement. Blesta Addons 1 Link to comment Share on other sites More sharing options...
Michael Posted June 8, 2015 Report Share Posted June 8, 2015 Would it be possible to get a dropdown box next to it with the tld and then hosting requires a something.something then the tld from the dropdown box using just normal tlds? .com, .net, .org, .co.uk, etc? Link to comment Share on other sites More sharing options...
Blesta Addons Posted June 8, 2015 Report Share Posted June 8, 2015 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] PauloV 1 Link to comment Share on other sites More sharing options...
Tyson Posted June 18, 2015 Report Share Posted June 18, 2015 This will be updated in 3.5 as apart of CORE-1716. Link to comment Share on other sites More sharing options...
EidolonHost Posted June 18, 2015 Report Share Posted June 18, 2015 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. 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 More sharing options...
Tyson Posted June 18, 2015 Report Share Posted June 18, 2015 Nice. I'll make sure to make use of that function when it gets released in my dedicated server module. 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+. Blesta Addons 1 Link to comment Share on other sites More sharing options...
Blesta Addons Posted June 19, 2015 Report Share Posted June 19, 2015 The same i think should be updated in all virtualization module like proxmox and vpsnet . Link to comment Share on other sites More sharing options...
Jonathan Posted June 19, 2015 Author Report Share Posted June 19, 2015 This will be updated in 3.5 as apart of CORE-1716. This is great, thanks! Link to comment Share on other sites More sharing options...
Jonathan Posted June 19, 2015 Author Report Share Posted June 19, 2015 Since you're adding stuff, hostnames should not start with "www." so might be nice to add another rule to prevent that Link to comment Share on other sites More sharing options...
Jonathan Posted July 9, 2015 Author Report Share Posted July 9, 2015 Bump on disallowing www or regex capabilities we can enter on the Solus module similar to how the universal module works. Link to comment Share on other sites More sharing options...
Tyson Posted July 10, 2015 Report Share Posted July 10, 2015 CORE-1736 for stripping "www." from SolusVM. The original FQDN issue is resolved, so I'll close this thread as completed. PauloV and Michael 2 Link to comment Share on other sites More sharing options...
Recommended Posts