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

View File

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

View File

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

View File

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