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
(cherry picked from commit 1493c928c2
)
This commit is contained in:
parent
d0995dcef7
commit
f1ba778dc9
|
@ -876,8 +876,10 @@ class SimpleCaptcha {
|
||||||
// for the user, which we don't know, when he did it.
|
// for the user, which we don't know, when he did it.
|
||||||
if ( $this->action === 'edit' ) {
|
if ( $this->action === 'edit' ) {
|
||||||
$status->fatal(
|
$status->fatal(
|
||||||
|
// T293818 - only worried about $content here
|
||||||
|
// @phan-suppress-next-line SecurityCheck-DoubleEscaped
|
||||||
new RawMessage(
|
new RawMessage(
|
||||||
Html::element(
|
Html::rawElement(
|
||||||
'div',
|
'div',
|
||||||
[ 'class' => 'errorbox' ],
|
[ 'class' => 'errorbox' ],
|
||||||
$context->msg( 'captcha-edit-fail' )->text()
|
$context->msg( 'captcha-edit-fail' )->text()
|
||||||
|
|
Loading…
Reference in a new issue