fixed bug with magic_quotes_gpc Off

This commit is contained in:
Roland Gruber 2004-02-16 19:50:22 +00:00
parent c8978f7cd9
commit 633a0e87e3
4 changed files with 12 additions and 7 deletions

View File

@ -40,7 +40,8 @@ if (($_GET['action'] == "edit") || ($_GET['action'] == "new")) {
$domsuff = $_SESSION['ldap']->search_units($_SESSION['config']->get_domainSuffix()); $domsuff = $_SESSION['ldap']->search_units($_SESSION['config']->get_domainSuffix());
if ($_GET['action'] == "edit") { if ($_GET['action'] == "edit") {
// remove "\'" // remove "\'"
$_GET['DN'] = str_replace("\\'", "", $_GET['DN']); $_GET['DN'] = str_replace("\\", "", $_GET['DN']);
$_GET['DN'] = str_replace("'", "", $_GET['DN']);
// load attributes from domain // load attributes from domain
for ($i = 0; $i < sizeof($domlist); $i++) { for ($i = 0; $i < sizeof($domlist); $i++) {
if ($domlist[$i]->dn == $_GET['DN']) { if ($domlist[$i]->dn == $_GET['DN']) {
@ -185,7 +186,8 @@ if (($_GET['action'] == "edit") || ($_GET['action'] == "new")) {
// delete domain, ask if sure // delete domain, ask if sure
elseif ($_GET['action'] == "delete") { elseif ($_GET['action'] == "delete") {
// remove "\'" and make array // remove "\'" and make array
$DNs = str_replace("\\'", "", $_GET['DN']); $DNs = str_replace("\\", "", $_GET['DN']);
$DNs = str_replace("'", "", $DNs);
$DNs = explode(";", $DNs); $DNs = explode(";", $DNs);
// display page // display page
echo $_SESSION['header']; echo $_SESSION['header'];

View File

@ -39,7 +39,8 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
$fail = array(); $fail = array();
$errors = array(); $errors = array();
$new_suff = $_POST['new_suff']; $new_suff = $_POST['new_suff'];
$new_suff = str_replace("\\'", "", $new_suff); $new_suff = str_replace("\\", "", $new_suff);
$new_suff = str_replace("'", "", $new_suff);
$new_suff = explode(";", $new_suff); $new_suff = explode(";", $new_suff);
// add entries // add entries
for ($i = 0; $i < sizeof($new_suff); $i++) { for ($i = 0; $i < sizeof($new_suff); $i++) {
@ -176,7 +177,8 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
// first show of page // first show of page
$new_suff = $_GET['suffs']; $new_suff = $_GET['suffs'];
$new_suff = str_replace("\\'", "", $new_suff); $new_suff = str_replace("\\", "", $new_suff);
$new_suff = str_replace("'", "", $new_suff);
$new_suff = explode(";", $new_suff); $new_suff = explode(";", $new_suff);
echo $_SESSION['header']; echo $_SESSION['header'];

View File

@ -34,7 +34,8 @@ setlanguage();
// get user name // get user name
$user = $_GET['user']; $user = $_GET['user'];
$user = str_replace("\'", '',$user); $user = str_replace("\\", '',$user);
$user = str_replace("'", '',$user);
// get DN of user // get DN of user
$dn = $_SESSION['ldap']->search_username($user); $dn = $_SESSION['ldap']->search_username($user);

View File

@ -49,11 +49,11 @@ if ($_POST['forward'] == "yes") {
elseif ($_POST['submit']) { elseif ($_POST['submit']) {
// create new user profile // create new user profile
if ($_POST['profile'] == "newuser") { if ($_POST['profile'] == "newuser") {
metaRefresh("profileuser.php"); metaRefresh("profilepage.php?type=user");
} }
// edit user profile // edit user profile
elseif($_POST['profile'] == "edituser") { elseif($_POST['profile'] == "edituser") {
metaRefresh("profileuser.php?edit=" . $_POST['e_user']); metaRefresh("profileuser.php?type=user&amp;edit=" . $_POST['e_user']);
} }
// delete user profile // delete user profile
elseif($_POST['profile'] == "deluser") { elseif($_POST['profile'] == "deluser") {