Check for very old PCRE versions in installer and updater

RE_IPV6_ADD uses (?(-n)) ("relative reference condition"), and CSSMin uses
\K ("reset start of match"), which only work in PCRE 7.2 and later -- newer
versions than the PCRE 6.6 included with Red Hat Enterprise Linux 5 and its
derivatives (e.g. CentOS 5).

Because the WMF developers, in general, do not seem to support maintaining
compatibility with such old software versions, I have opted to add a check
to the MediaWiki installer for these versions of PCRE. Affected users are
directed to a MediaWiki.org page advising the use of a different PHP package
that uses the bundled PCRE version instead of the older system version.

For now, the minimum PCRE version is set to 7.2, the oldest version not
known to break MediaWiki core. Once PHP 5.3 support is dropped, we may be
able to require PCRE 8.12 (bundled with PHP 5.4.0) or later.

The existing check for mere existence of the PCRE functions is removed;
since PHP 5.3, it is impossible to compile PHP without PCRE support.

Bug: 58213
Change-Id: Icf3732b6f84eeb25990178ae8fe3bd0fe4cc833f
(cherry picked from commit b215d91224f711e263126ae3b8546e022f33ef00)
SECURITY: Sanitize shell command args

Add validation and sanitization to several code paths.


Bug: 60339
Change-Id: Id124281d21ec730a2e0bbace843dd97194a712b4
Update Release Notes and Version number

Change-Id: If71074f25a73c6c078a11b9ef453c27d0125ab42
Special:PrefixIndex omits stripprefix=1 for "Next page" link

backport from I05c26db132d0f7edadb82a798fdba37277a3eddb

Bug: 60543
Change-Id: I92348b66e95e51fa5cff97cd316012d6a9cf5a86
Add error handling if descriptionmsg isn't defined for extension.

Warning, Untested. Nobody likes fatals in the installer.
See bug 43817 comment 12.

Change-Id: I51453c38e59a635e8f0ad69e84daf2589750742f
Bug: 43817
Fix rebuildall.php fatal error with PostgreSQL

The fix for 47055 introduced a fatal error when running rebuildall.php. This
is a workaround suggested by gebhkla on Bugzilla (idle for 10+ days). It just
checks to make sure $options is actually an array before calling array_search
on it.

Bug: 60094
Change-Id: Ib54420b5a749c60b82a4757a9f5fa511f48fdb72
(cherry picked from commit afb297d175963d19735735c0283396a6cdcdf35a)
Avoid variable naming conflicts in DatabasePostgres::selectSQLText

Spotted by gebhkla on bug 60531

Bug: 60531
Change-Id: Iaf100ea0db05b142549bd98da108e48eae8b9101
Correct sequence name for fresh Postgres installation

Spotted by gebhkla on bug 60083

Bug: 60083
Change-Id: I34283c2539f4ce9d1b85756b3e1c16d255000ed5
(cherry picked from commit 305622fbc95a50fdb83cb9a4dda8c27f61710ede)
Various fixes to job running code in Wiki.php

* Make it async on Windows
* Fixed possible "invalid filename" errors on Windows
* Redirect output to dev/null to avoid hanging PHP

bug: 60231
bug: 58719
Change-Id: If4e52b86fb3a1bff283dfba3dfac213367f47543
(cherry picked from commit 96b678e110f90237d66eb095fa6cf223524d7ff4)
Merge "Correct sequence name for fresh Postgres installation" into REL1_22
Merge "Add error handling if descriptionmsg isn't defined for extension." into REL1_22
Add sequence support for upsert in DatabaseOracle

In the same way as in selectInsert

Bug: 53710
Change-Id: I26f891da808ecdc932e29eebda71df4c17a29617
(cherry picked from commit 3d0f393ced80206053e18f893a17fbb81be14c8d)
SECURITY: Make token comparison constant time

It seems like our token comparison would be vulnerable to timing
attacks. This will take constant time.

Bug: 61346
Change-Id: I2a9e89120f7092015495e638c6fa9f67adc9b84f
(cherry picked from commit 74ce391e9c115320e74c06772ee4fcb610ae33c4)
SECURITY: API: Don't find links in the middle of api.php links

Bug: 61362
Change-Id: Idf985e4e69c2f11778a8a90503914678441cb3fb
(cherry picked from commit 55cd620157d884af855459f1f7903b0427c992ce)
SECURITY: Disallow non-whitelisted namespaces

Disallow uploading non-whitelisted namespaces. Also disallow iframe
elements.

User will get an error including the namespace name if they use a non-
whitelisted namespace.

Bug: 60771
Change-Id: Id5c022543184b19b77ad32d9a8a0c2dbbc5e9038
Merge "SECURITY: Make token comparison constant time" into REL1_22
Merge "SECURITY: Disallow non-whitelisted namespaces" into REL1_22
Updated Release Notes and version number for 1.22.3

This is the MW1.22.3 maintenance release

Change-Id: I9f400338f7f450b097a13fd9932e2b2ec17b5ffb
Updated release notes

Release notes are now readable without the context of the according bugs

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