miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Bugs miniBB Support Forums / Bugs /  
 

Some top-level domains not accepted for user email address

 
Author Steve Shaw
Partaker
#1 | Posted: 31 Jan 2021 18:48 
We are having an issues where some of the newer top-level domains, such as .media, are not being accepted for user email addresses — specifically when a user tries to update/change their registered address.

Any hints on how to fix this?

Steve

Author Paul
Lead Developer 
#2 | Posted: 3 Feb 2021 20:39 
Thank you for noticing this — yes, miniBB still uses a 4-char limit for the domain extension. Appears outdated and I'll fix it in the new release.

By now, the quickest solution you may apply to your script:

— open bb_func_checkusr.php for editing

— locate the regular expression check applied to the $dbUserSheme['user_email'][1] — that's the only one place and looks like this:
«#^[0-9a-z]+([._-][0-9a-z_]+)*_?@[0-9a-z]+([._-][0-9a-z]+)*[.][0-9a-z]{2}[0-9A-Z]?[0-9A-Z]?$#i»
— Try to remove the closing patterns and extend it to 63 chars (the maximum TLD length specified by RFC 1034 is 63 octets, currently the longest domain extension is about 24 chars and it is XN--VERMGENSBERATUNG-PWB accordingly to the IANA list):
«#^[0-9a-z]+([._-][0-9a-z_]+)*_?@[0-9a-z]+([._-][0-9a-z]+)*[.][0-9a-z]{63}$#i»
I didn't try it out, but by all logics it should work...

This is a temporary solution. I suppose, for the new miniBB version I will use more sophisticated embedded function of PHP like filter_var, with the FILTER_VALIDATE_EMAIL.

So you could also update the full line of code, replacing:
elseif(!preg_match(«#^[0-9a-z]+([._-][0-9a-z_]+)*_?@[0-9a-z]+([._-][0-9a-z]+)*[.][0-9a-z]{2}[0-9A-Z]?[0-9A-Z]?$#i», ${$dbUserSheme['user_email'][1]})) $correct=4;
to:
elseif(!filter_var(${$dbUserSheme['user_email'][1]}, FILTER_VALIDATE_EMAIL)) $correct=4;

Author Steve Shaw
Partaker
#3 | Posted: 5 Feb 2021 14:43 
Paul, just so you know, I had selected 'Watch this topic and get updates by email', but did not get an email notification about your reply.
And it is not in spam, as I have the ability to check everything.
(Just for info, based on the work you are presently doing for us.)

Steve

Author Steve Shaw
Partaker
#4 | Posted: 5 Feb 2021 14:49 
Also, your second suggested fix appears to work. Thanks.

Steve

Author Paul
Lead Developer 
#5 | Posted: 5 Feb 2021 22:11 
Steve Shaw:
Paul, just so you know, I had selected 'Watch this topic and get updates by email', but did not get an email notification about your reply.
I'm absolutely sure emailing from PHP works on this server.

I've created some topic here for tests. Could you subscribe to it from your account (tick the "Watch this topic and get updates by email" box) and reply something? Then log-out and go to this topic again. Post something as a Guest (just enter some random username with no password and proceed with Captcha). Will you get something?

I could check this all directly in my server email logs, so I will report you if I've got replies you've made (I'm also subscribed to that topic).

Author Steve Shaw
Partaker
#6 | Posted: 5 Feb 2021 22:14 
I got the message for this post...
It really does seem random if the messages are sent/received, or not.

Steve

Author Paul
Lead Developer 
#7 | Posted: 5 Feb 2021 22:18 
Right after sending my message above, I've checked email logs on the server and clearly see that the message went to your email address.

However for February the 3rd 2021, when I posted my initial message, I see that no email has been actually sent to you.

Are you really sure that you've ticked the "watch" box right among creating the new topic?.. sometimes we only think that this or that was done...

Author Paul
Lead Developer 
#8 | Posted: 5 Feb 2021 22:18 
Steve Shaw:
It really does seem random if the messages are sent/received, or not.
This is a program... it couldn't be random if it's not coded that way. Either it works or not. I'm pretty sure it works.

Author Steve Shaw
Partaker
#9 | Posted: 5 Feb 2021 22:25 
Well, I got the message for your post again...
This really is very confusing.
Especially as it is the one thing I get most complaints from from out users.

And we have 'subscribe' set to 'ticked' by default, so the user has to 'un-tick' if they do not want to subscribe...

Steve

Author Paul
Lead Developer 
#10 | Posted: 5 Feb 2021 22:30 
The only confusion could be, is that your users do not check the topic they are subscribed to. The only first notification is being sent. If after it's sent the user doesn't check the topic (visiting it or clicking link in the email), no new notifications are generated.

As you see, if you visit the topic constantly, it all works.

Also, if you have an access to your email logs, they could be useful to analyze. Like to repeat, I'm 100% sure the script sent nothing after I've posted reply in this topic. I suspect that having the Watch box enabled by default on your forum, you may have thought that here it also set up that way and even didn't pay attention to it. If you'd be really subscribed, you've got a message like you're getting them now.

Bugs miniBB Support Forums / Bugs /
 Some top-level domains not accepted for user email address
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑