mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
SECURITY: Avoid double-escaping html tag contents
* Avoid double-escaping the captcha-edit-fail message via both Html::element and RawMessage. * Also add suppress comment due to overall taint of RawMessage. Bug: T293818 Change-Id: I6b985266a26f6b152bca05a91f6054ed1a5f2a5a
This commit is contained in:
parent
d0995dcef7
commit
1493c928c2
|
@ -876,8 +876,10 @@ class SimpleCaptcha {
|
|||
// for the user, which we don't know, when he did it.
|
||||
if ( $this->action === 'edit' ) {
|
||||
$status->fatal(
|
||||
// T293818 - only worried about $content here
|
||||
// @phan-suppress-next-line SecurityCheck-DoubleEscaped
|
||||
new RawMessage(
|
||||
Html::element(
|
||||
Html::rawElement(
|
||||
'div',
|
||||
[ 'class' => 'errorbox' ],
|
||||
$context->msg( 'captcha-edit-fail' )->text()
|
||||
|
|
Loading…
Reference in a new issue