From aa435cecfbddd6771467fc51354efad5b40a836e Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 16 Sep 2017 13:31:59 +0200 Subject: [PATCH] removed obsolete magic_quotes_gpc handling --- lam/templates/account/edit.php | 8 -------- lam/templates/config/confmain.php | 7 ------- lam/templates/config/mainmanage.php | 7 ------- lam/templates/login.php | 3 --- lam/templates/profedit/profilepage.php | 14 +------------- 5 files changed, 1 insertion(+), 38 deletions(-) diff --git a/lam/templates/account/edit.php b/lam/templates/account/edit.php index cc530a7e..c5610d1f 100644 --- a/lam/templates/account/edit.php +++ b/lam/templates/account/edit.php @@ -107,14 +107,6 @@ else if (count($_POST)==0) { $_SESSION['account']->new_account(); } -// remove double slashes if magic quotes are on -if (get_magic_quotes_gpc() == 1) { - $postKeys = array_keys($_POST); - for ($i = 0; $i < sizeof($postKeys); $i++) { - if (is_string($_POST[$postKeys[$i]])) $_POST[$postKeys[$i]] = stripslashes($_POST[$postKeys[$i]]); - } -} - // show account page $_SESSION['account']->continue_main(); diff --git a/lam/templates/config/confmain.php b/lam/templates/config/confmain.php index 86e1d3e9..792963ee 100644 --- a/lam/templates/config/confmain.php +++ b/lam/templates/config/confmain.php @@ -625,13 +625,6 @@ function checkInput() { $conf = &$_SESSION['conf_config']; $types = $conf->get_ActiveTypes(); - // remove double slashes if magic quotes are on - if (get_magic_quotes_gpc() == 1) { - $postKeys = array_keys($_POST); - for ($i = 0; $i < sizeof($postKeys); $i++) { - if (is_string($_POST[$postKeys[$i]])) $_POST[$postKeys[$i]] = stripslashes($_POST[$postKeys[$i]]); - } - } // check new preferences $errors = array(); if (!$conf->set_ServerURL($_POST['serverurl'])) { diff --git a/lam/templates/config/mainmanage.php b/lam/templates/config/mainmanage.php index d06f4225..21dddcbc 100644 --- a/lam/templates/config/mainmanage.php +++ b/lam/templates/config/mainmanage.php @@ -90,13 +90,6 @@ $errors = array(); $messages = array(); // check if submit button was pressed if (isset($_POST['submitFormData'])) { - // remove double slashes if magic quotes are on - if (get_magic_quotes_gpc() == 1) { - $postKeys = array_keys($_POST); - for ($i = 0; $i < sizeof($postKeys); $i++) { - if (is_string($_POST[$postKeys[$i]])) $_POST[$postKeys[$i]] = stripslashes($_POST[$postKeys[$i]]); - } - } // set master password if (isset($_POST['masterpassword']) && ($_POST['masterpassword'] != "")) { if ($_POST['masterpassword'] && $_POST['masterpassword2'] && ($_POST['masterpassword'] == $_POST['masterpassword2'])) { diff --git a/lam/templates/login.php b/lam/templates/login.php index 3d7b26f9..b8e6a262 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -582,9 +582,6 @@ if(!empty($_POST['checklogin'])) { display_LoginPage($_SESSION['config'], $_SESSION["cfgMain"], $licenseValidator, $error_message); // Empty password submitted. Return to login page. exit(); } - if (get_magic_quotes_gpc() == 1) { - $_POST['passwd'] = stripslashes($_POST['passwd']); - } $username = $_POST['username']; $password = $_POST['passwd']; } diff --git a/lam/templates/profedit/profilepage.php b/lam/templates/profedit/profilepage.php index 7f142513..897223d3 100644 --- a/lam/templates/profedit/profilepage.php +++ b/lam/templates/profedit/profilepage.php @@ -125,13 +125,6 @@ if (isset($_POST['save'])) { } } - // remove double slashes if magic quotes are on - if (get_magic_quotes_gpc() == 1) { - foreach ($opt_keys as $element) { - if (isset($options[$element][0]) && is_string($options[$element][0])) $options[$element][0] = stripslashes($options[$element][0]); - } - } - // check options $errors = checkProfileOptions($_POST['accounttype'], $options); if (sizeof($errors) == 0) { // input data is valid, save profile @@ -169,12 +162,7 @@ if (isset($_POST['save'])) { $postKeys = array_keys($_POST); for ($i = 0; $i < sizeof($postKeys); $i++) { if (!is_array($_POST[$postKeys[$i]])) { - if (get_magic_quotes_gpc() == 1) { - $old_options[$postKeys[$i]] = array(stripslashes($_POST[$postKeys[$i]])); - } - else { - $old_options[$postKeys[$i]] = array($_POST[$postKeys[$i]]); - } + $old_options[$postKeys[$i]] = array($_POST[$postKeys[$i]]); } else { $old_options[$postKeys[$i]] = $_POST[$postKeys[$i]];