Page MenuHomePhabricator

XSS in Charts extension combined with TemplateStyles, LanguageConverter, ToC
Closed, ResolvedPublicSecurity

Description

I did verify that this actually works on test.wikipedia.org (In a page preview). The underlying issue is quite complex and a combination of a lot of factors

Steps to reproduce:

  • Set your skin to a skin that is not vector-2022. The exploit relies on the table of contents being in the body of the article. legacy vector or timeless should work fine. (Note: in the context of an exploit, an attacker can force the choice of skin with the useskin url parameter)
  • Create a page that has the page language set to 'sr'.
    • The exploit will work for any language that supports language converter (You can do this by setting $wgLanguageCode = 'sr'; alternatively set $wgPageLanguageUseDB = true; (This is the case on some WMF wikis) you can use Special:PageLanguage to adjust the language of the page. Some extensions (Translate) might also adjust page language.
  • Install Charts and JsonConfig extensions
  • Create a chart where the text Date appears somewhere in it.
  • Install TemplateStyles extension
  • Create a template styles sanitized-css page named Template:test/xss.css containing the following text:
@media ( width <meta\ ) { [\/property="mw:PageProp/toc"] > f {} }

@media ( width <xss\  )  {
	autofocus foo[\/onfocus="alert('xss on' + origin)"][\/tabindex="1"] > baz {
	}
}
  • In your page that has the page language set to sr, edit it to have the following text:
-{H|Date=>sr:<templatestyles src="Template:test/xss.css"/>;Date=>sr-ec:<templatestyles src="Template:test/xss.css"/>;Date=>sr-el:<templatestyles src="Template:test/xss.css"/>}-

{{#chart:Example Line Chart.chart}}

==foo==
==bar==
==baz==
  • View the page. You should see an alert box pop-up

How this works

Charts extension uses a parser function in isHtml mode. This uses a general strip item type (as opposed to a Nowiki strip marker). This means language conversion (As well as doBlockLevels and the less relavent final internal links replacement) still happens to it. Language conversion allows us to put markup into the chart. We are still limited to what would normally be valid in a normal wikipage.

TemplateStyles seems to assume that HTML escaping rules are in place. However if a <style> tag is in an SVG (or MathML) namespace, then the rules are slightly different. In normal html, contents of <style> tag is plain text until a </style> tag is encountered. In foreign content namespaces,tags inside the <style> tag become children.

So in principle, <style><img src=x onerror=alert(1)></style> is fine in HTML but an xss in an SVG context. Note that children of <style> tags in svg are generally not rendered (which in svg prevent events from being triggered on them). However per https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign there are certain foreign content breaking tags, which change the mode back to html (<img> is one of them, but so are things like <div>).

In TemplateStyles we can make a tag like thing using @media queries

@media ( width <img ) {}

However, minification turns that into @media(width <img){}. Keep in mind, in HTML a tag name is only ended by (ascii) whitespace, all other characters are valid parts of a tag name. If minification was disabled, this would be a lot easier to exploit. However with minification, it seems currently its impossible in template styles to make the opening tag without a weird symbol attached. These still get turned into elements. However because they are children of a non-rendered SVG element, they themselves are outside of the render tree and don't get any events.

This is where @media ( width <meta\ ) { [\/property="mw:PageProp/toc"] > f {} } . In the parser, the TOC is set as a marker <meta property="mw:PageProp/toc" /> which is then replaced later.

However the regex to replace it is fairly permissive:

/**
 * Permissive regexp matching TOC_PLACEHOLDER.  This allows for some 
 * minor modifications to the placeholder to be made by extensions
 * without breaking the TOC (T317857); note also that Parsoid's version
 * of the placeholder might include additional attributes.
 * @var string
 */
private const TOC_PLACEHOLDER_REGEX = '/<meta\\b[^>]*\\bproperty\\s*=\\s*"mw:PageProp\\/toc"[^>]*>/';

In particular, this is quite a bit more permissive than the HTML spec, as it only checks that meta is followed by a word break (\b). Symbols are generally considered word break characters to PCRE, so @media(width<meta\ ){[\/property="mw:PageProp/toc"]>f{}} matches this regex even though HTML would not consider that a <meta> tag. Once its matches it is replaced with the TOC which contains a bunch of foreign content breaker elements.

Thus we have the <style> in the SVG, which has a TOC in it which switches the mode back to HTML, then we have our <xss\ > tag, which as an HTML tag, can now get focus and run js events.

Fix recommendation

For the immediate fix, I think Charts extension should armour the output of its parser function with $parser->getStripState()->addNoWiki. (This would also prevent any newlines in the svg from messing things up. Since the language converter only applies to the non-script fallback right now, i imagine you probably don't want it generally so disabling it would be a good thing all and all in terms of consistency)

However, it seems like there are a lot of foot-guns around here, so maybe some of MW core/TemplateStyles could also use some improvements. In many ways, this feels more like a vulnerability in other components that just happened to be triggered by Charts instead of one in Charts itself.

  • TOC_PLACEHOLDER_REGEX should be more strict
  • Potentially the check in TemplateStyles:
if ( preg_match( '!</style!i', $value ) ) { 
        $value = ''; 
        $status->fatal( 'templatestyles-end-tag-injection' );
}

should be improved to '!<[a-zA-Z_]' (DomPurify does something like this to prevent mXSS).

  • css-sanitizer should consider a <-delimiter followed by an identifier (or maybe any token type) to be seperable tokens (in the sense of Token::separate()), so < will be followed by whitespace instead of being right up next to a letter (and thus not a valid tag)
  • LanguageConverter could be maybe ported to RemexHTML, and then not be run on foreign namespaces
  • As an aside, at a glance, it looks like RemexHTML doesn't implement the foreign content breaker rules from the HTML spec (i might be misunderstanding). However i don't think that matters in any way, just something i noticed.
  • Maybe we should also be more careful with BlockLevelPasses. Could be dangerous in the context of svgs, not sure (maybe not)
  • If MediaWiki had a CSP policy that prevented unsafe-inline, this type of attack would be prevented
  • if the charts extension used iframe sandboxing, this attack would not work

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Thanks for the report! Was able to reproduce.
Impact: non-Vector 2022 skins (including mobile site); projects that use language converter.

Just keep in mind, the way xss attacks often play out, is an attacker convinces the victim to click on a malicious link. In that context, the attacker can add &useskin=fallback to make it trigger regardless of the skins installed on the wiki. If you are specifically targeting an admin, you can still trigger by doing something like https://MYWIKIHERE/w/index.php?title=MediaWiki:random/sr&action=edit&section=new&preloadtitle=test%0A%0A-%7BH%7CChart%3D%3Esr%3Afoo123%20%3Ctemplatestyles%20src%3D%22Template%3AFoo%2Fafds.css%22%2F%3E%3BChart%3D%3Esr-ec%3Afoo123%20%3Ctemplatestyles%20src%3D%22Template%3AFoo%2Fafds.css%22%2F%3E%3BChart%3D%3Esr-el%3Afoo123%20%3Ctemplatestyles%20src%3D%22Template%3AFoo%2Fafds.css%22%2F%3E%7D-%0A%0A%7B%7B%23chart%3AExample.chart%7D%7D%0A%0A%3D%3Dfoo%3D%3D%0A%3D%3Dbar%3D%3D%0A%3D%3Dbaz%3D%3D%0A"&preview=yes&useskin=fallback [Assuming the template styles page exists] even if the wiki does not use language converter, and does not have $wgPageLanguageUseDB enabled. It only works if your victim is an admin, but they are the juicy targets. So there is some impact even if the wiki does not use language converter and only has vector-2022 installed.

This doesn't seem to be UBN given the extremely complex execution paths, multiple components involved (Charts, LC, TemplateStyles/css-sanitizer, et al) and arcane knowledge of MediaWiki an attacker would need to exploit this vulnerability. And it sounds like the initial suggested fix of guarding Chart's parser function output via $parser->getStripState()->addNoWiki() would sufficiently address this issue in Wikimedia production for now? (Which should be handled as a security patch on this task...)

Wow. This exploit touches a lot of code which is actually on its way out with Parsoid. There are a number of fixes here.

  1. the whole point of the css sanitizer in TemplateStyles is to not let this sort of thing through. I support locking down media queries further in css-sanitizer/template styles. It was never intended to be a complete replacement for all CSS, only to allow through "CSS which is safe for editors to author" and I'm happy stating that this sort of thing should not be in editor-authored CSS.
  1. The legacy parser (and sanitizer) rely in many many places on a convention that all HTML is in a somewhat "normalized" form, with (as one example) all attributes double-quoted (not unquoted, not single-quoted). This allowed it to function with regexps and without a "real" HTML parser. This generally works ok, but (a) since then we have Remex which can do the job correctly and efficiently, and (b) the original regexps didn't account for <style> tags and "foreign content". I suspect the style tags break a number of assumptions anywhere we use a regexp as a fake HTML parser, and so should probably always be strip-marker-ed or otherwise excluded from the HTML.
  1. The replacement of the <meta> tag for the TOC could easily be done by Remex and probably should. Performance should be compared. The TOC is expected to be balanced, and properly balancing the TOC (as Parsoid does) may also remediate one aspect of this.
  1. LanguageConverter is reimplemented in Parsoid, and will probably be rewritten as an OutputTransform in 2025, for Parsoid at least. We are probably not going to spend any additional time armoring this on the legacy parser, however, given that the legacy parser is expected to go away in the next year or two. (Same for BlockLevelPasses, which is an artifact of the legacy parser.)
  1. We have working iframe sandboxing patches, which we reverted because they were unused at the time. But it may be work poking @Tgr to dust them off again. I am in general in favor of moving toward greater sandboxing of fragments in our output.

As far as action items, I endorse the following suggestions from @Bawolff:

  1. Patch TemplateStyles to be stricter about <[A-Z], although we should be cautious in deployment since this could be used in legit media queries.
  2. Patch css-sanitizer to be stricter about parsing media queries. Insisting on a number or an @-rule on the RHS of the inequality seems totally reasonable, eg.
  3. Make replaceTableOfContentsMarker stricter. I don't think TOC_PLACEHOLDER_REGEX needs to be stricter, necessarily, but the $matches it results in could be passed through remex or the Sanitizer for validity, which should be fairly cheap. I will note that <meta\ ){[\="" property="mw:PageProp/toc" ]=""> is in fact legit HTML, though.
  4. Verify that RemexHTML implements the foreign content breaker rules in HTML -- I actually assume that it does, because it follows the spec fairly closely, but this bears investigation.
  5. Investigate restoring the iframe sandboxing patches
  6. Investigate using a strip marker for <style> in TemplateStyles in order to protect other places in core which manipulate HTML using regexps.
  7. Investigate using Remex to further balance/sanitize TOC contents. I thought we did that already for T218330/68ccfa46adeac5061f60b35dc2f9e662714d357c but it appears we could be stricter.

From original bug report:

For the immediate fix, I think Charts extension should armour the output of its parser function with $parser->getStripState()->addNoWiki. (This would also prevent any newlines in the svg from messing things up. Since the language converter only applies to the non-script fallback right now, i imagine you probably don't want it generally so disabling it would be a good thing all and all in terms of consistency)

I was not previously aware that the 'isHtml return type of a parser function was not /actually/ rawHTML, but was instead the input to Parser::internalParseHalfParsed and goes through doBlockLevels, replaceLinkHolders, language conversion, and tidy (including 'armorFrenchSpaces').

I think that should actually be considered a bug in most cases where raw HTML is returned, and in Icb8eae9c1f3146e19c6bd811ab1fc86eebaa991f I propose using the 'nowiki' strip item in general for parser functions of this type.

The legacy parser (and sanitizer) rely in many many places on a convention that all HTML is in a somewhat "normalized" form, with (as one example) all attributes double-quoted (not unquoted, not single-quoted). This allowed it to function with regexps and without a "real" HTML parser. This generally works ok, but (a) since then we have Remex which can do the job correctly and efficiently, and (b) the original regexps didn't account for <style> tags and "foreign content". I suspect the style tags break a number of assumptions anywhere we use a regexp as a fake HTML parser, and so should probably always be strip-marker-ed or otherwise excluded from the HTML.

I actually think historically the legacy parser didn't really assume this. Language Converter goes through a lot of pain to make sure it works properly with all types of attribute quoting, and strip marker (and link markers) have ' and " in them to specifically defend against different attribute style quoting. Historically, the MediaWiki Html class did not always use double quote (changed in 2016 with ee4d5c6eed3e). To this day, PHP-OOUI uses apostraphes not double quotes (Generally not something that is going to be in the page body, but not impossible with transcludable special pages). Its also hard to be certain that every extension everywhere uses double quotes. I don't really know i agree that it is a safe assumption for the legacy parser to assume everything is normalized like this, even if finding an exploitable example would be extremely difficult

and so should probably always be strip-marker-ed or otherwise excluded from the HTML.

Just to clarify, templatestyles is strip marked away. In the exploit, language converter takes the strip marker and inserts it into the <svg>. It never looks inside the strip marker, it just move the strip marker from one place to another. There is protection against putting strip markers in attributes, but nothing against putting it inside the contents of an svg <text> element.

We are probably not going to spend any additional time armoring this on the legacy parser, however, given that the legacy parser is expected to go away in the next year or two. (Same for BlockLevelPasses, which is an artifact of the legacy parser.)

That's fair if its going away. However there is currently a list of tags that language converter ignores, (near the beginning of LanguageConverter::recursiveConvertTopLevel). Currently that list is just <style> and <script>. It would probably be really easy to add <math> and <svg> to that list to avoid foreign content.

Make replaceTableOfContentsMarker stricter. I don't think TOC_PLACEHOLDER_REGEX needs to be stricter, necessarily, but the $matches it results in could be passed through remex or the Sanitizer for validity, which should be fairly cheap. I will note that <meta\ ){[\="" property="mw:PageProp/toc" ]=""> is in fact legit HTML, though.

I was thinking something along the lines of <meta\s might make sense instead of <meta\b. Still very permissive, but verifies its actually a meta tag and not a tag with a name starting with meta, which gives much less room to attackers. Maybe it shouldn't matter, since by the time you have something prefixed with <meta something has gone very wrong, but seems like there isn't much downside.

Investigate using a strip marker for <style> in TemplateStyles in order to protect other places in core which manipulate HTML using regexps.

This is already the case

Investigate using Remex to further balance/sanitize TOC contents. I thought we did that already for T218330/68ccfa46adeac5061f60b35dc2f9e662714d357c but it appears we could be stricter.

The attack does not rely on the HTML being unbalanced, only that there is a foreign content breaker tag.

I was not previously aware that the 'isHtml return type of a parser function was not /actually/ rawHTML, but was instead the input to Parser::internalParseHalfParsed and goes through doBlockLevels, replaceLinkHolders, language conversion, and tidy (including 'armorFrenchSpaces').

What especially surprised me was that markerType = 'nowiki' or something equivalent wasn't even an option. setting nowiki simply does wfEscapeWikiText() which is not what is desired here. The only option seems to be calling $parser->getStripState() directly in extension.

It always kind of weirded me out that for tag extensions, general is the default type. I guess it makes sense that language converter is run on the output of most extensions, but its definitely very odd that doBlockLevels() is, as i have trouble imagining that is usually wanted.

Some patches:

I actually think historically the legacy parser didn't really assume this.

Well, it was always patchy. But Sanitizer::fixTagAttributes() puts everything in double-quoted form, and I'll just say that we certainly found a lot of bugs when we first started putting Parsoid output into core, because Parsoid used single quotes. I think if you are going to be doing HTML manipulation with regexps, which is a bad idea in general, insisting a normalized form for your HTML is a reasonable mitigation.

I think isRawHTML is the more sensible default for parser functions, and will probably deprecate isHTML eventually as part of the transition to Parsoid (for which emulating the existing legacy behavior of isHTML would be very difficult). If you actually want language conversion, you can call convert yourself before emitting your HTML.

The legacy parser will still run armorFrenchSpaces on everything at the very end, but Parsoid will fix that, too.

@sbassett should we aim to get these changes deployed next week or are we okay with the risk of this issue being live over the holidays?

I can confirm the following patches address the issue:

If we want this fixed before the end of year, I'd feel more comfortable backporting these next week (as I will not be around following week)

In terms of the isHTML thing, i think it is also telling that the Charts extension has the following code:

// HACK work around a parser bug that inserts <p> tags even though we said not to parse
$html = str_replace( ">\n", '>', $html );

@Jdlrobson-WMF -

@sbassett should we aim to get these changes deployed next week or are we okay with the risk of this issue being live over the holidays?
...
If we want this fixed before the end of year, I'd feel more comfortable backporting these next week (as I will not be around following week)

I'd prefer getting these deployed sooner than later, yes, so that we at least have some protection in production, despite the low risk of this issue IMO.

In terms of the isHTML thing, i think it is also telling that the Charts extension has the following code:

// HACK work around a parser bug that inserts <p> tags even though we said not to parse
$html = str_replace( ">\n", '>', $html );

Yes, I removed that when switching to isRawHTML although I'd appreciate if the Charts team could verify that it is no longer needed.

Here are my suggested patches (I don't know if you want them on this bug or if i should submit them to gerrit. This does seem lower risk than normal for going through gerrit)

F57785273 cscott already did this

F57785272 cscott has an alternative approach that is probably better.

@bvibber it looks like you added this HACK comment as part of implementing tracking categories - T369684 - can we remove it?

This is a belt-and-suspenders sort of thing with a lot of moving pieces. I'd suggest getting one of the protection patches deployed to production -- seems like the isRawHMTL patches to core/Charts are the favorites there -- and then we can put the rest of the "suspenders" patches in gerrit and review them normally there.

@bvibber it looks like you added this HACK comment as part of implementing tracking categories - T369684 - can we remove it?

This was added on July 25th in 9ba1edee by Roan.

As far as I can see the newline hack was meant to work around the partial parsing problem, and can be freely removed once the patches land (it's harmless itself).

I'm happy to help make sure these go out Monday, or if we have to rush it on the weekend ping me on IRC -- Slack is being SUPER unreliable with notifications right now for me for some reason (Android update may have borked it)

On looking at https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1101112 I have a couple notes:

  • it appears to function correctly
  • but it does change an existing code path without explanation and I want to double-check that doesn't break assumptions
  • the general underlying assumptions of the old parser that resulted in this bug are just ugly and awkward, and this is calling out for further checks on other extensions to make sure there's no surprises
  • there's no test cases for the old or new behavior on the patch, which means we have no protection against regressions

We can clarify or undo the code path divergence and add some quick tests and I'll be happy enough with it for now. If no objection I'll work this afternoon to throw in some quick test cases to ensure no surprise block levels or language converter processing happens on the resulting unstripped output.

I'm unable to reproduce the alert() xss so far with $wgLanguageCode = 'sr' and the given
sample pages

testing in Chrome/Mac
Version 131.0.6778.109 (Official Build) (arm64)

I'm also unable to reproduce on test.wikipedia.org.

Managed to reproduce on test.wikipedia.org by setting a target page's content language to 'sr', but still can't reproduce it on my local instance. Narrowed it down to "any of dozens of extensions or config settings that aren't on my local instance" :D

Managed to reproduce on test.wikipedia.org by setting a target page's content language to 'sr', but still can't reproduce it on my local instance. Narrowed it down to "any of dozens of extensions or config settings that aren't on my local instance" :D

Keep in mind https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1101115 was merged (but not deployed) which prevents the vuln.

ARGH

Ok that explains why I've spent all day with the XSS not happening.

Thanks. :)

*sheepish*

I've scheduled a backport of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1101115 to 1.44.0-wmf-6 for tomorrow's UTC late backport window to make sure it's out for defense in depth. Back to testing/cleanup on the rest at leisure.

Just to restate current status: IMO all of the following are bugs which should be patched, although fixing any one of these links in the exploit chain is sufficient to mitigate it:

  1. Language converter inside math/SVG https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1101115
  2. "isHTML" not actually meaning "html" in parser function returns https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1101112
  3. Css sanitizer not sanitizing media queries ( foo < meta is as far as I know not a valid media query yet it is allowed through the sanitizer) https://phabricator.wikimedia.org/T381617#10387991 ?
  4. TOC insertion being too generous with its regex substitution https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1101111
  5. TemplateStyles allowed inside TOC entries (we already call 'removeSomeTags', we should make that stricter)

Thanks all for the updates and work on this. IIUC, getting https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1101115 backported to 1.44.0-wmf.6/wmf.7 and deployed to Wikimedia production (soon) should fully mitigate this issue within Wikimedia production, for now, while the additional work/patches here are less urgent to the immediate security issue but should still be completed. Does that sound correct?

Css sanitizer not sanitizing media queries ( foo < meta is as far as I know not a valid media query yet it is allowed through the sanitizer) https://phabricator.wikimedia.org/T381617#10387991 ?

The css level 4 spec seems to say identifiers are valid as media feature values in range syntax. https://www.w3.org/TR/mediaqueries-4/#mq-syntax however its a bit less clear when it makes sense for a range media feature to not be a number. I think @media (resolution<infinite ){} is valid. Im not sure if there are any other ranged keywords.

Note foo < meta would not be allowed through, you need one side of the inequality to be a valid media feature name, e.g. width < meta works

TemplateStyles allowed inside TOC entries (we already call 'removeSomeTags', we should make that stricter)

I dont think this is required by the exploit chain.


@sbassett - once that patch is deployed, should i put my patches to template styles that are currently private on this bug on to gerrit (publicly)?

@sbassett - once that patch is deployed, should i put my patches to template styles that are currently private on this bug on to gerrit (publicly)?

Assuming you're talking about the two remaining from T381617#10387991, that should be fine, since TemplateStyles and the css-sanitizer dependency aren't core-bundled, AFAIK. We'd likely want to track those for T375631 as well.

sbassett changed Risk Rating from N/A to High.

Change #1101600 merged by jenkins-bot:

[mediawiki/core@wmf/1.44.0-wmf.6] LanguageConverter: Ignore content inside <math> and <svg> elements

https://gerrit.wikimedia.org/r/1101600

Change #1102972 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[css-sanitizer@master] Ensure that < and alphabetical tokens are separated

https://gerrit.wikimedia.org/r/1102972

Change #1102982 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/extensions/TemplateStyles@master] Ensure that <[a-z] cannot be in stylesheets, as it looks like html

https://gerrit.wikimedia.org/r/1102982

Change #1114014 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[css-sanitizer@master] Add tests for < and alphabetical tokens being separated

https://gerrit.wikimedia.org/r/1114014

Change #1102972 merged by jenkins-bot:

[css-sanitizer@master] Ensure that < and alphabetical tokens are separated

https://gerrit.wikimedia.org/r/1102972

Change #1114014 merged by jenkins-bot:

[css-sanitizer@master] Add tests for < and alphabetical tokens being separated

https://gerrit.wikimedia.org/r/1114014

Change #1101111 merged by jenkins-bot:

[mediawiki/core@master] Use Remex/HtmlHelper to implement Parser::replaceTableOfContents

https://gerrit.wikimedia.org/r/1101111

Change #1102982 merged by jenkins-bot:

[mediawiki/extensions/TemplateStyles@master] Ensure that <[a-z] cannot be in stylesheets, as it looks like html

https://gerrit.wikimedia.org/r/1102982

Change #1101112 merged by jenkins-bot:

[mediawiki/core@master] Add 'isRawHTML' output mode for parser functions and extensions

https://gerrit.wikimedia.org/r/1101112

Given that https://gerrit.wikimedia.org/r/1101112 and above related change sets are now merged, are there any other mitigations we're trying to push here? @Bawolff? It seems like the critical pieces of this are now complete...

I'd agree that the main mitigations are now merged.

As an aside, i realized after the fact that the original PoC can also work on non serbian wikis that dont have $wgUsePagweLanguage set by using the <languageconvert> tag, which i has forgotten existed.

sbassett claimed this task.
sbassett reassigned this task from sbassett to cscott.
sbassett moved this task from Watching to Our Part Is Done on the Security-Team board.
sbassett edited projects, added SecTeam-Processed; removed Patch-For-Review.

Change #1101117 merged by jenkins-bot:

[mediawiki/extensions/Chart@master] Use the `isRawHTML` parser function return value type

https://gerrit.wikimedia.org/r/1101117

Is there anything missing before the task can be made public? (Or does it need to stay PermanentlyPrivate)? I only ask because this is such an amazing piece of work that @Bawolff has put together here that I’d like to show it to some other people on occasion :D

(Also several Gerrit changes mention this task, but I think anyone would be hard-pressed to figure out the reproduction steps from those references alone.)

Are we planning to backport any of the fixes for T382316? (I guess wikis with TemplateStyles on MediaWiki 1.42 and 1.43 would already have gotten the new css-sanitizer version if they updated composer recently, because it’s semver-compatible with the ^5.1.0 constraint in TemplateStyles’ composer.json; the 1.39 branch unfortunately requires ~4.0.0.)

I'd be fine making this task public once every change set above was in Wikimedia production, which should be the case after next week.

FYI, i do intend to turn this into a blog post once it is public

FYI, i do intend to turn this into a blog post once it is public

I'd guess that's perfectly fine, but maybe give a heads up to legal@?

@sbassett I think everything is merged and deployed at this point. Is it ok to make the task public?

@sbassett I think everything is merged and deployed at this point. Is it ok to make the task public?

Yes, most likely, let me just double-check with Legal real quick.

@Bawolff - Legal is fine with your proposed blog post with the caveat of "just don't talk about any ongoing security incidents, etc.", which shouldn't be the case here anyways.

Change #1148340 had a related patch set uploaded (by Reedy; author: C. Scott Ananian):

[mediawiki/core@REL1_43] Use Remex/HtmlHelper to implement Parser::replaceTableOfContents

https://gerrit.wikimedia.org/r/1148340

Change #1148340 merged by jenkins-bot:

[mediawiki/core@REL1_43] Use Remex/HtmlHelper to implement Parser::replaceTableOfContents

https://gerrit.wikimedia.org/r/1148340