From fcef3ef57e7493e80e02bf6e078d9c0070108bfb Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Tue, 22 Jan 2013 17:43:41 +0000 Subject: [PATCH] Fix for Trac #670: XSS vulnerability issue. SVN:2.0[2590] --- pages/UI.php | 2 +- pages/run_query.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/UI.php b/pages/UI.php index a187da15d..8083960ec 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -817,7 +817,7 @@ try else { $oP->set_title(Dict::S('UI:SearchResultsPageTitle')); - $oP->p("

".Dict::Format('UI:FullTextSearchTitle_Text', $sFullText)."

"); + $oP->p("

".Dict::Format('UI:FullTextSearchTitle_Text', htmlentities($sFullText, ENT_QUOTES, 'UTF-8'))."

"); $iCount = 0; $iBlock = 0; // Search in full text mode in all the classes diff --git a/pages/run_query.php b/pages/run_query.php index 0e617e0ce..218b05d51 100644 --- a/pages/run_query.php +++ b/pages/run_query.php @@ -161,7 +161,7 @@ try $oP->add("
\n"); $oP->add(Dict::S('UI:RunQuery:ExpressionToEvaluate')."
\n"); - $oP->add("\n"); + $oP->add("\n"); if (count($aArgs) > 0) { @@ -187,7 +187,7 @@ try $oP->p(''); $oP->StartCollapsibleSection(Dict::S('UI:RunQuery:MoreInfo'), false); - $oP->p(Dict::S('UI:RunQuery:DevelopedQuery').$oFilter->ToOQL()); + $oP->p(Dict::S('UI:RunQuery:DevelopedQuery').htmlentities($oFilter->ToOQL(), ENT_QUOTES, 'UTF-8')); $oP->p(Dict::S('UI:RunQuery:SerializedFilter').$oFilter->serialize()); $oP->EndCollapsibleSection(); }