From 9712ce4ef2b5228aed2af3c84d9d8a5df480fbc1 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 29 Jan 2019 12:40:38 -0500 Subject: [PATCH] Encode shaper queue name before printing. Issue #9294 Validation is already present and prevents bad values from being entered. (cherry picked from commit 1072b9333c47df593420937361349b09a9b73639) --- src/etc/inc/shaper.inc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/etc/inc/shaper.inc b/src/etc/inc/shaper.inc index d59989d925..c017caf257 100644 --- a/src/etc/inc/shaper.inc +++ b/src/etc/inc/shaper.inc @@ -1600,13 +1600,13 @@ class priq_queue { } function build_tree() { - $tree = "
  • GetInterface()."&queue=". $this->GetQname()."&action=show"; + $tree = "
  • GetInterface()."&queue=". htmlspecialchars($this->GetQname())."&action=show"; $tree .= "\" "; $tmpvalue = $this->GetDefault(); if (!empty($tmpvalue)) { $tree .= " class=\"navlnk\""; } - $tree .= " >" . $this->GetQname() . ""; + $tree .= " >" . htmlspecialchars($this->GetQname()) . ""; /* * Not needed here! * if (is_array($queues) { @@ -2369,13 +2369,13 @@ class hfsc_queue extends priq_queue { } function build_tree() { - $tree = "
  • GetInterface() ."&queue=" . $this->GetQname()."&action=show"; + $tree = "
  • GetInterface() ."&queue=" . htmlspecialchars($this->GetQname())."&action=show"; $tree .= "\" "; $tmpvalue = $this->GetDefault(); if (!empty($tmpvalue)) { $tree .= " class=\"navlnk\""; } - $tree .= " >" . $this->GetQname() . ""; + $tree .= " >" . htmlspecialchars($this->GetQname()) . ""; if (is_array($this->subqueues)) { $tree .= "