Jump to content
  • 0

Blesta.com Not A Valid Domain Name ? - According To Blesta


nuv

Question

Hello,

 

While entering the main domain name for web hosting, the domain field does not accept capitalized domain names. Making the domain name small in the backend would have made more sense than to throw an error that the domain name isn't valid. According to Domain Names specification (RFC 2035), they are not only valid but identical. 

 

Normally,it wouldn't be a problem but while ordering via mobile, most phones are set to input capitalized words and that error isn't specific and confusing. So, I'd like to convince you guys to drop that check or alter it to make it small in the back end. 

 

Am I missing some logic here ? Your input is appreciated. 

 

Irrespective of your decision, I'd like a hack/change in code etc. for it. I don't think its very user friendly. Will/Can it cause problems ? Capital domain names

 

domain.png

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

That error is defined in a module. I assume cPanel is what you're using?

You could update the regex that it is using to make it case-insensitive if you'd like, i.e.,

update /components/modules/cpanel/cpanel.php

find:

"/^([a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])(\.([a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]))+$/"

change to:

"/^([a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])(\.([a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]))+$/i"

and try again.

 

I'm not sure how cPanel will respond to the request for a domain with capital letters. It's possible they may reject it on their end, in which case you would need to make the domain lower case before sending.

Link to comment
Share on other sites

  • 0

If you want to update the cPanel module again, same file as mentioned above, find and change this line:

'domain' => isset($vars['cpanel_domain']) ? $vars['cpanel_domain'] : null,

to:

'domain' => isset($vars['cpanel_domain']) ? strtolower($vars['cpanel_domain']) : null,

I think that would take care of it.

Link to comment
Share on other sites

  • 0

If you want to update the cPanel module again, same file as mentioned above, find and change this line:

'domain' => isset($vars['cpanel_domain']) ? $vars['cpanel_domain'] : null,

to:

'domain' => isset($vars['cpanel_domain']) ? strtolower($vars['cpanel_domain']) : null,

I think that would take care of it.

 

 

any chance that could be part of every module mate?

Link to comment
Share on other sites

  • 0

niyo's link suggests to me that this has happened before and reported and a "feature request" was opened to rectify this. But that was for Resellerclub. (In fact, the guy who reported it got confused with the same thing i.e wasn't working via mobile which just proves my theory.)

 

Guys come on, why can't we have this universally ? We want this, it enhances usability. Apparently everyone is hacking their code to get this done on one module or the other.   

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...