We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

emails causing cronjobs problem [Solved] | Forum

Mohammad
Mohammad Feb 27 '14
Hello team

Today someone told me whatever he do,no matter what but cronjobs is not working

I got access details and open ~cron.php manually from browser,I got 500 error,So I turn on debug modes to see what's going on !

I found out emails causing this problem So I went to database(base_user table),change the email and everything's working fine.

the bug is,Oxwall validation for emails is not good,you should look for a better regex

in 6000 users 2 users email were like this

username.@example.com

the dot before @ raised an error in cron

The Forum post is edited by ross Mar 2 '14
Mohammad
Mohammad Feb 27 '14
here is a suggestion regex for email validation



/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix

ross Team
ross Feb 27 '14
Yes, the problem was caused by the invalid e-mail addresses. 

In 1.6. we have fixed this problem

we use this regex^ const EMAIL_PATTERN = '/^([\w\-\.\+\%]*[\w])@((?:[A-Za-z0-9\-]+\.)+[A-Za-z]{2,})$/';

Mohammad
Mohammad Feb 28 '14
Thanks for reply ross

and regex is working properly.good to see it's fixed

ross Team
ross Mar 2 '14
I'm going to mark this post as solved.