SECURITY: Handle -{}- syntax in attributes safely
authorBrian Wolff <bawolff+wn@gmail.com>
Thu, 11 Feb 2016 22:08:03 +0000 (17:08 -0500)
committerReedy <reedy@wikimedia.org>
Wed, 15 Nov 2017 03:33:03 +0000 (03:33 +0000)
commitf21f3942eb10d7e688eb25261ac3a9478268cbd3
tree23629b2372e79970bac113635765adeb779f688e
parentfbe78cfa094645b907d0fd2885c5797321f794eb
SECURITY: Handle -{}- syntax in attributes safely

Previously, if one had an attribute with the contents
"-{}-foo-{}-", foo would get replaced by language converter as if
it wasn't in an attribute. This lead to an XSS attack.

This breaks doing manual conversions in url href's (or any
other attribute that goes through an escaping method
other than Sanitizer's). e.g. http://{sr-el:foo';sr-ec:bar}.com
won't work anymore. See also T87332

Bug: T119158
Change-Id: Idbc45cac12c309b0ccb4adeff6474fa527b48edb
languages/LanguageConverter.php
tests/parser/parserTests.txt