summaryrefslogtreecommitdiffstats
path: root/settings/ajax
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-03-24 15:35:07 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-03-24 15:35:07 +0100
commit3eb5898f7b8f8b836b15dcb9c9a9213d7edbda96 (patch)
treeae3bc7d4acd407f89c5a1f3c3346ecb6c8f5fef4 /settings/ajax
parentfb7f3008d33cb123f8b6931f6edf8697913b355a (diff)
downloadnextcloud-server-3eb5898f7b8f8b836b15dcb9c9a9213d7edbda96.tar.gz
nextcloud-server-3eb5898f7b8f8b836b15dcb9c9a9213d7edbda96.zip
use \OC_Mail::validateAddress() to validate the email address - fixes #7862
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/lostpassword.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/settings/ajax/lostpassword.php b/settings/ajax/lostpassword.php
index b5f47bbceab..88c2bee6142 100644
--- a/settings/ajax/lostpassword.php
+++ b/settings/ajax/lostpassword.php
@@ -6,7 +6,7 @@ OCP\JSON::callCheck();
$l=OC_L10N::get('core');
// Get data
-if( isset( $_POST['email'] ) && filter_var( $_POST['email'], FILTER_VALIDATE_EMAIL) ) {
+if( isset( $_POST['email'] ) && OC_Mail::validateAddress($_POST['email']) ) {
$email=trim($_POST['email']);
OC_Preferences::setValue(OC_User::getUser(), 'settings', 'email', $email);
OC_JSON::success(array("data" => array( "message" => $l->t("Email saved") )));