From 9fb0f040c9f67fed16a2c9aef836af8f39aa4136 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Tue, 10 Jan 2012 16:08:48 +0000 Subject: [PATCH] fix xss from poor sanitisation/checking of $_GET[domain], thanks to Flippo Cavallarin for reporting this git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/branches/postfixadmin-2.3@1321 a1433add-5e2c-0410-b055-b7f2511e0802 --- templates/menu.php | 54 +++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/templates/menu.php b/templates/menu.php index 0788a409..da68e8ef 100644 --- a/templates/menu.php +++ b/templates/menu.php @@ -1,8 +1,8 @@
  • $title$submenu
  • "; - return "
  • $title$submenu
  • "; + if ($submenu != "") $submenu = ""; + return "
  • $title$submenu
  • "; } authentication_has_role('global-admin'); @@ -10,15 +10,15 @@ authentication_has_role('global-admin'); echo "\n"; print "

    "; # TODO if (authentication_has_role('global-admin')) { - $motd_file = "motd-admin.txt"; + $motd_file = "motd-admin.txt"; } else { - $motd_file = "motd.txt"; + $motd_file = "motd.txt"; } if (file_exists (realpath ($motd_file))) { - print "
    \n"; - include ($motd_file); - print "
    "; + print "
    \n"; + include ($motd_file); + print "
    "; } @@ -95,15 +95,15 @@ if (file_exists (realpath ($motd_file))) ?>