resourceloader: Sanitize lang with isValidBuiltInCode(), not isValidCode()
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 28 Oct 2015 23:55:39 +0000 (23:55 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 29 Oct 2015 00:55:43 +0000 (00:55 +0000)
commit3b829b4385eda5b986baf9fb41e740e563193a0c
treee46386d6dc76f04479ccf9570241064b1da2df43
parent13a35dac582cf44ce8e2b6f3e9448b4b6c6f3874
resourceloader: Sanitize lang with isValidBuiltInCode(), not isValidCode()

Follows-up r96280 (368dbc5f5b), and r82927 (1e67922842).

Language::isValidCode() (used by index.php) allows a very wide range of values,
which inflates the msg_resource cache quite a bit (T102058). This is a first
step toward locking it down.

This change affects both handling of incoming load.php requests, and the
formatting of request urls by OutputPage. As such, OutputPage will no longer
forward invalid uselang values that are valid for index.php to load.php.

Change-Id: I27857ce5949bc616c7179f5f47b24aa2f6765f5f
includes/resourceloader/ResourceLoaderContext.php