Make allowing site-wide styles on restricted special pages a config option

This mostly reverts commit 614d7e5c274d927f99bfc52ac3a1e6c7e5902408.

Many wikis use MediaWiki:Common.css and associated pages to create a
custom "theme" for their wiki, which would no longer load on login
or preference pages, creating an inconsistent UI.

This re-adds the difference in module origin for different types
(styles, scripts, etc.), and now OutputPage::disallowUserJs()
checks the value of the "AllowSiteCSSOnRestrictedPages" config setting
to determine whether to allow site-wide CSS styles or not.

By default this feature is disabled to be secure by default.

Bug: 71621
Change-Id: I1bf4dd1845b6952c3985e179fbea48181ffb8907
API: Work around wfMangleFlashPolicy()

The things wfMangleFlashPolicy() does to the output break things in the
API. For JSON we can work around it, while for PHP we just have to error
out. XML isn't affected because <> are escaped anyway (unless something
somehow uses 'cross-domain-policy' as a tag name), and the rest are
going away soon so they're not worth the trouble.

Backport, originally committed by Brad Jorsch

Bug: 66776
Change-Id: Idc5f37bd778288a9cde572f081dc753d681ec354
Make calling wfMangleFlashPolicy configurable

Add $wgMangleFlashPolicy so sites that define a safe master flash
policy can disable mangling of the <cross-domain-policy> string.

Backport, originally committed by csteipp

Bug: 66776
Change-Id: Ic0db939aae9d0bb6bdfc3cd9ce282661bad46783
Added updated version history from 1.19.2 to 1.22.13

Bug: 42723
Change-Id: Id75f189abdfbb98499bd84eb35840547265d18ca
(cherry picked from commit 66f41336029e242a4f6cc33dc2270843fd2450b5)
Merge "Make calling wfMangleFlashPolicy configurable" into REL1_23
Merge "API: Work around wfMangleFlashPolicy()" into REL1_23
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).

Bug: T73111

Change-Id: I2f1caa57e8fc705ef52fc4b6f351a174b72b33cb
SECURITY: Require new right to change content model

Add the user right 'editcontentmodel', which is required to change the
content model while editing a Page.

Bug: 70901

Change-Id: Ibb463a74a8aaee1731f72c520e48f7bc3b120e34
Merge "SECURITY: Require new right to change content model" into REL1_23
SECURITY: Do not show log action if revdeleted

Also do not include revdeleted entries in search results when
filtering by action if user cannot view that info.

Bug: 72222
Change-Id: I9f331c421c55323018765456d6a99229e1fff592
Updated release notes and version number for MediaWiki 1.23.7

This is MediaWiki 1.23.7 security and maintenance release.

Change-Id: Ib796284fb7be80fee37652bdc9acc4e91f4d0bf9
Merge branch 'REL1_23' of https://gerrit.wikimedia.org/r/p/mediawiki/core into REL1_23