From 2ad687caf2e3ba269a328006d6aff179f4d5773c Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Wed, 2 Jun 2010 22:20:39 +0000 Subject: [PATCH] replacing echoes and urlencode by ehe() in VALUES of forms text input fields (prevent UTF/ISO and ENTITIES hacking) --- bureau/admin/adm_add.php | 10 +++---- bureau/admin/adm_defquotas.php | 2 +- bureau/admin/adm_donosu.php | 4 ++- bureau/admin/adm_dosu.php | 4 ++- bureau/admin/adm_edit.php | 13 +++++---- bureau/admin/adm_list.php | 2 ++ bureau/admin/adm_mxaccount.php | 4 +-- bureau/admin/adm_panel.php | 2 ++ bureau/admin/adm_quotaedit.php | 2 ++ bureau/admin/adm_slaveaccount.php | 4 +-- bureau/admin/adm_slaveip.php | 2 +- bureau/admin/adm_tldadd.php | 2 +- bureau/admin/adm_variables.php | 2 +- bureau/admin/bro_main.php | 2 +- bureau/admin/browseforfolder.php | 2 +- bureau/admin/ftp_add.php | 8 +++--- bureau/admin/ftp_edit.php | 4 +-- bureau/admin/hta_add.php | 2 +- bureau/admin/hta_adduser.php | 4 +-- bureau/admin/hta_doadd.php | 5 ++++ bureau/admin/mem_cm.php | 2 +- bureau/admin/mem_param.php | 28 ++++++++++---------- bureau/admin/quota_show.php | 4 ++- bureau/admin/quotas_users.php | 22 ++++++++------- bureau/admin/sql_add.php | 2 +- bureau/admin/sql_bck.php | 2 +- bureau/admin/sta2_add_raw.php | 2 +- bureau/admin/sta2_edit_raw.php | 2 +- bureau/locales/fr_FR/LC_MESSAGES/messages.po | 16 +++++++++-- 29 files changed, 97 insertions(+), 63 deletions(-) diff --git a/bureau/admin/adm_add.php b/bureau/admin/adm_add.php index d235ebec..b920198d 100644 --- a/bureau/admin/adm_add.php +++ b/bureau/admin/adm_add.php @@ -54,15 +54,15 @@ if ($error) {
- + - + @@ -77,11 +77,11 @@ if ($error) { - + - + diff --git a/bureau/admin/adm_defquotas.php b/bureau/admin/adm_defquotas.php index cd4c3f0f..5e9a0bbe 100644 --- a/bureau/admin/adm_defquotas.php +++ b/bureau/admin/adm_defquotas.php @@ -95,7 +95,7 @@ foreach($q as $name => $value) { - + diff --git a/bureau/admin/adm_donosu.php b/bureau/admin/adm_donosu.php index 7a8d09ad..5c7b8791 100644 --- a/bureau/admin/adm_donosu.php +++ b/bureau/admin/adm_donosu.php @@ -41,7 +41,9 @@ getFields($fields); if (!$admin->su2normal($uid)) { $error=$err->errstr(); -} + } else { + $error=_("This account is now a normal account"); + } include("adm_edit.php"); diff --git a/bureau/admin/adm_dosu.php b/bureau/admin/adm_dosu.php index 7f2ee54c..2357c685 100644 --- a/bureau/admin/adm_dosu.php +++ b/bureau/admin/adm_dosu.php @@ -41,7 +41,9 @@ getFields($fields); if (!$admin->normal2su($uid)) { $error=$err->errstr(); -} + } else { + $error=_("This account is now an administrator account"); + } include("adm_edit.php"); diff --git a/bureau/admin/adm_edit.php b/bureau/admin/adm_edit.php index 3edd4069..0a46c430 100644 --- a/bureau/admin/adm_edit.php +++ b/bureau/admin/adm_edit.php @@ -55,6 +55,8 @@ if (!$r=$admin->get($uid)) { ?>

+
+
$error

"; @@ -96,15 +98,15 @@ if (!$r=$admin->get($uid)) { - + - + - + @@ -169,8 +171,9 @@ if ($r["su"]) {

get($r["creator"]); -printf(_("Account created by %s"),$c["login"]); +if ($c=$admin->get($r["creator"])) { + printf(_("Account created by %s"),$c["login"]); + } ?>

- - + +
- +
 /  / 
" size="20" maxlength="128" /> / " size="20" maxlength="128" />" size="20" maxlength="128" /> / " size="20" maxlength="128" />
" size="30" maxlength="128" />" size="30" maxlength="128" />
" /> " onclick="document.location='ftp_list.php'"/> diff --git a/bureau/admin/ftp_edit.php b/bureau/admin/ftp_edit.php index 9f01d021..d25486c7 100644 --- a/bureau/admin/ftp_edit.php +++ b/bureau/admin/ftp_edit.php @@ -57,9 +57,9 @@ if (!$id) { -
-  _ " size="20" maxlength="64" /> +  _ " size="20" maxlength="64" />
" size="20" maxlength="64" /> +
" size="20" maxlength="64" />