projects
/
platal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acaa676
)
Prevents valide_email from returning non valid email addresses.
author
Stéphane Jacob
<sj@m4x.org>
Sun, 18 Oct 2009 22:19:04 +0000
(
00:19
+0200)
committer
Stéphane Jacob
<sj@m4x.org>
Sun, 18 Oct 2009 22:19:04 +0000
(
00:19
+0200)
include/emails.inc.php
patch
|
blob
|
blame
|
history
diff --git
a/include/emails.inc.php
b/include/emails.inc.php
index
d6e885f
..
cd7e0a0
100644
(file)
--- a/
include/emails.inc.php
+++ b/
include/emails.inc.php
@@
-55,8
+55,11
@@
function valide_email($str)
$em = trim(rtrim($str));
$em = str_replace('<', '', $em);
$em = str_replace('>', '', $em);
+ if (strpos($em, '@') === false) {
+ return;
+ }
list($ident, $dom) = explode('@', $em);
- if ($dom == $globals->mail->domain
or
$dom == $globals->mail->domain2) {
+ if ($dom == $globals->mail->domain
||
$dom == $globals->mail->domain2) {
list($ident1) = explode('_', $ident);
list($ident) = explode('+', $ident1);
}