From 831b5d60a4b7478003fd39705bdd1192c4ebbaa1 Mon Sep 17 00:00:00 2001 From: jangliss Date: Sun, 18 Apr 2004 19:25:59 +0000 Subject: [PATCH] Using QUERY_STRING without sanitizing it is BAD... Encoding it for URL use should get rid of XSS issue. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7164 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/read_body.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/read_body.php b/src/read_body.php index 0d740c7d..60aad1a4 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -735,7 +735,11 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) { global $base_uri; $urlMailbox = urlencode($mailbox); - sqgetGlobalVar('QUERY_STRING', $query_string, SQ_SERVER); + if (sqgetGlobalVar('QUERY_STRING', $query_string, SQ_SERVER)) { + $query_string = urlencode($query_string); + } else { + $query_string = ''; + } $url = $base_uri.'src/view_header.php?'.$query_string; $s = "\n" . -- 2.25.1