diff options
author | Bernhard Fröhlich <bernhard@cacert.org> | 2019-07-26 22:20:24 +0200 |
---|---|---|
committer | Bernhard Fröhlich <bernhard@cacert.org> | 2019-07-26 22:20:24 +0200 |
commit | bd1afd659c60e45a21c2ba810baae54c4d884d10 (patch) | |
tree | aa50d45718beca44a4e4ba1d59a4ab00abbd81bd | |
parent | a948882e28d61d13b5acaafb2c1cbf5bb316cbf9 (diff) | |
download | cacert-devel-bd1afd659c60e45a21c2ba810baae54c4d884d10.tar.gz cacert-devel-bd1afd659c60e45a21c2ba810baae54c4d884d10.tar.xz cacert-devel-bd1afd659c60e45a21c2ba810baae54c4d884d10.zip |
Revert "Disabled email check (untested!)"
This reverts commit 5d86ef79b9d2bb14dca223a9a76d098e9452604d.
-rw-r--r-- | includes/account.php | 4 | ||||
-rw-r--r-- | includes/general.php | 21 | ||||
-rw-r--r-- | stamp/report.php | 2 | ||||
-rw-r--r-- | www/index.php | 2 |
4 files changed, 4 insertions, 25 deletions
diff --git a/includes/account.php b/includes/account.php index 9a57daf..6dacf2d 100644 --- a/includes/account.php +++ b/includes/account.php @@ -136,7 +136,7 @@ function buildSubjectFromSession() { showfooter(); exit; } - $checkemail = checkEmailDummy($_REQUEST['newemail']); + $checkemail = checkEmail($_REQUEST['newemail']); if($checkemail != "OK") { showheader(_("My CAcert.org Account!")); @@ -642,7 +642,7 @@ function buildSubjectFromSession() { showfooter(); exit; } - $checkemail = checkEmailDummy($authaddy); + $checkemail = checkEmail($authaddy); if($checkemail != "OK") { showheader(_("My CAcert.org Account!")); diff --git a/includes/general.php b/includes/general.php index 640c444..735f357 100644 --- a/includes/general.php +++ b/includes/general.php @@ -552,27 +552,6 @@ @unlink($tmpfname); } - /* This function is used on testservers to replace the email address check, so you can create accounts - for arbitraty mail addresses. It only roughly checks the syntax of the address. - Do not use this on a production server! " */ - function checkEmailDummy($email) - { - $myemail = mysql_real_escape_string($email); - if(preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\+\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/" , $email)) - { - $line = "250 No address check on testserver."; - $query = "insert into `pinglog` set `when`=NOW(), `email`='$myemail', `result`='$line'"; - if(is_array($_SESSION['profile'])) $query.=", `uid`='".intval($_SESSION['profile']['id'])."'"; - mysql_query($query); - - if(substr($line, 0, 3) != "250") - return $line; - else - return "OK"; - } - return "Invalid mail address"; - } - function checkEmail($email) { $myemail = mysql_real_escape_string($email); diff --git a/stamp/report.php b/stamp/report.php index 5b11569..519aa3a 100644 --- a/stamp/report.php +++ b/stamp/report.php @@ -40,7 +40,7 @@ if($process != "") { - $checkemail = checkEmailDummy($email); + $checkemail = checkEmail($email); if($checkemail != "OK") { $errmsg = $checkemail; diff --git a/www/index.php b/www/index.php index c2e7af0..8c5560c 100644 --- a/www/index.php +++ b/www/index.php @@ -426,7 +426,7 @@ if ($oldid == 52 ) if($id == 2) { - $checkemail = checkEmailDummy($_SESSION['signup']['email']); + $checkemail = checkEmail($_SESSION['signup']['email']); if($checkemail != "OK") { $id = 1; |