SECURITY: Add edit token to Special:ExpandTemplates
authorKevin Israel <pleasestand@live.com>
Fri, 26 Sep 2014 04:38:07 +0000 (00:38 -0400)
committermglaser <glaser@hallowelt.biz>
Wed, 26 Nov 2014 22:57:33 +0000 (23:57 +0100)
commit9d7a0a1b0ab2af065f2a3973c2c7dfc4b2eea06c
tree76bc6d68481200cd412bb543d2b8abf349da9fcc
parentfcbcab693f82afc22b2be7965335d1753e747fa7
SECURITY: Add edit token to Special:ExpandTemplates

On wikis that allow raw HTML, it is not safe to preview wikitext coming from
an untrusted source such as a cross-site request. Thus add an edit token to
the form, and when raw HTML is allowed, ensure the token is provided before
showing the preview.

Unfortunately, MediaWiki does not currently provide logged-out users with
CSRF protection; in that case, do not show the preview unless anonymous
editing is allowed (such wikis have been, and are still, vulnerable).

Change-Id: I2f1caa57e8fc705ef52fc4b6f351a174b72b33cb
includes/specials/SpecialExpandTemplates.php
languages/i18n/en.json
languages/i18n/qqq.json