Skip to content

Commit

Permalink
[SECURITY] Encode error messages in Query Generatory & Query View
Browse files Browse the repository at this point in the history
Properly encodes error messages to be used in HTML output in
"EXT:lowlevel" Query Generator and Query View components.

Resolves: #93868
Releases: master, 11.3, 10.4, 9.5
Change-Id: I05812ac7c1cded39edbf10d50bb4dc0fd8faf577
Security-Bulletin: CORE-SA-2021-010
Security-References: CVE-2021-32668
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69988
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
  • Loading branch information
ohader committed Jul 20, 2021
1 parent a4406f3 commit 843718e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/Database/QueryView.php
Expand Up @@ -469,7 +469,7 @@ public function queryMaker()
$output .= '<h2>SQL query</h2><div><pre>' . htmlspecialchars($fullQueryString) . '</pre></div>';
}
$out = '<p><strong>Error: <span class="text-danger">'
. $e->getMessage()
. htmlspecialchars($e->getMessage())
. '</span></strong></p>';
$output .= '<h2>SQL error</h2><div>' . $out . '</div>';
}
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/lowlevel/Classes/Database/QueryGenerator.php
Expand Up @@ -389,7 +389,7 @@ public function queryMaker()
$output .= '<h2>SQL query</h2><div><pre>' . htmlspecialchars($fullQueryString) . '</pre></div>';
}
$out = '<p><strong>Error: <span class="text-danger">'
. $e->getMessage()
. htmlspecialchars($e->getMessage())
. '</span></strong></p>';
$output .= '<h2>SQL error</h2><div>' . $out . '</div>';
}
Expand Down

0 comments on commit 843718e

Please sign in to comment.