From 871587bd9203d834ce45591be414247cccedb569 Mon Sep 17 00:00:00 2001 From: kanoi Date: Tue, 4 Aug 2015 11:29:14 +1000 Subject: [PATCH] php - disallow hotmail due to service failure problems --- pool/page_reg.php | 6 ++++++ pool/page_settings.php | 17 +++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pool/page_reg.php b/pool/page_reg.php index c512e3e5..c803be2d 100644 --- a/pool/page_reg.php +++ b/pool/page_reg.php @@ -125,6 +125,12 @@ function try_reg($info, $page, $menu, $name, $u) $ok = false; else { + if (stripos($mail, 'hotmail') !== false) + { + $ok = false; + $data['error'] = "hotmail not allowed"; + } + if (safepass($pass) !== true) { $ok = false; diff --git a/pool/page_settings.php b/pool/page_settings.php index ba31e01e..886cc3ed 100644 --- a/pool/page_settings.php +++ b/pool/page_settings.php @@ -127,11 +127,16 @@ function dosettings($data, $user) { case 'EMail': $email = getparam('email', false); - $pass = getparam('pass', false); - $twofa = getparam('2fa', false); - $ans = userSettings($user, $email, null, $pass, $twofa); - $err = 'EMail changed'; - $check = true; + if (stripos($email, 'hotmail') !== false) + $err = 'hotmail not allowed'; + else + { + $pass = getparam('pass', false); + $twofa = getparam('2fa', false); + $ans = userSettings($user, $email, null, $pass, $twofa); + $err = 'EMail changed'; + $check = true; + } break; case 'Address': if (!isset($data['info']['u_multiaddr'])) @@ -213,7 +218,7 @@ function dosettings($data, $user) $old = $_SESSION['old_set_email']; else $old = null; - emailAddressChanged($email, zeip(), $emailinfo, $old); +# emailAddressChanged($email, zeip(), $emailinfo, $old); break; case 'Address': payoutAddressChanged($email, zeip(), $emailinfo);