Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

checkmail() function in i_email_user.php
https://www.tinywebgallery.com/forum/viewtopic.php?f=5&t=2291
Page 1 of 1

Author:  Maskolis [ 8. Dec 2009, 18:05 ]
Post subject:  checkmail() function in i_email_user.php

Hello. I'm new and happy user of TWG v1.7.8.1
Great gallery!

I've noticed, that wrong email addresses are accepted while user tries to subscribe for gallery updates. The problem seems to be in checkmail() function in i_email_user.php (line 146):

function checkmail($string)
{
$test1 = preg_match("blah-blah-blah", $string);
if ($test1) {
return testEmailDomain($string);
} else {
return false; //should be true
}
}

Author:  TinyWebGallery [ 8. Dec 2009, 18:51 ]
Post subject: 

?

in my code it looks like:

else {
return true;
}

So you think it should return false?

Author:  Maskolis [ 8. Dec 2009, 18:58 ]
Post subject: 

Sorry - messed up my example. :oops:
Current code is as you mentioned - if provided address matches email pattern - script goes for further (url) verification.
else (address doesn't match email pattern - e.g. simple 'aaaaa') - script returns TRUE.
Should return FALSE.

Author:  TinyWebGallery [ 8. Dec 2009, 19:03 ]
Post subject: 

you are right - I changed it in the code.

It will be available in 1.8.

- Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/