From 14f74d141ab5580688bfd46d2f74c026e43ed967 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 1 Apr 2015 06:11:44 +0200 Subject: Update to MediaWiki 1.24.2 --- includes/DefaultSettings.php | 14 +- includes/EditPage.php | 26 +-- includes/Html.php | 7 +- includes/OutputPage.php | 8 +- includes/User.php | 40 +++-- includes/Xml.php | 4 +- includes/api/ApiFormatWddx.php | 48 +++++- includes/installer/PostgresUpdater.php | 24 ++- includes/libs/XmlTypeCheck.php | 251 ++++++++++++++++++---------- includes/media/BitmapMetadataHandler.php | 6 +- includes/media/JpegMetadataExtractor.php | 2 +- includes/media/XMP.php | 96 +++++++++++ includes/specialpage/SpecialPageFactory.php | 4 +- includes/specials/SpecialActiveusers.php | 8 +- includes/specials/SpecialJavaScriptTest.php | 248 ++++++++++++++++++--------- includes/specials/SpecialUserlogin.php | 13 +- includes/upload/UploadBase.php | 33 ++-- 17 files changed, 589 insertions(+), 243 deletions(-) (limited to 'includes') diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 71268932..aad42aac 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -75,7 +75,7 @@ $wgConfigRegistry = array( * Using single quotes is, therefore, important here. * @since 1.2 */ -$wgVersion = '1.24.1'; +$wgVersion = '1.24.2'; /** * Name of the site. It must be changed in LocalSettings.php @@ -4145,6 +4145,18 @@ $wgPasswordSalt = true; */ $wgMinimalPasswordLength = 1; +/** + * Specifies the maximal length of a user password (T64685). + * + * It is not recommended to make this greater than the default, as it can + * allow DoS attacks by users setting really long passwords. In addition, + * this should not be lowered too much, as it enforces weak passwords. + * + * @warning Unlike other password settings, user with passwords greater than + * the maximum will not be able to log in. + */ +$wgMaximalPasswordLength = 4096; + /** * Specifies if users should be sent to a password-reset form on login, if their * password doesn't meet the requirements of User::isValidPassword(). diff --git a/includes/EditPage.php b/includes/EditPage.php index 128244a8..38c80ba8 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2654,19 +2654,21 @@ class EditPage { array( 'userinvalidcssjstitle', $this->mTitle->getSkinFromCssJsSubpage() ) ); } - if ( $this->formtype !== 'preview' ) { - if ( $this->isCssSubpage && $wgAllowUserCss ) { - $wgOut->wrapWikiMsg( - "
\n$1\n
", - array( 'usercssyoucanpreview' ) - ); - } + if ( $this->getTitle()->isSubpageOf( $wgUser->getUserPage() ) ) { + if ( $this->formtype !== 'preview' ) { + if ( $this->isCssSubpage && $wgAllowUserCss ) { + $wgOut->wrapWikiMsg( + "
\n$1\n
", + array( 'usercssyoucanpreview' ) + ); + } - if ( $this->isJsSubpage && $wgAllowUserJs ) { - $wgOut->wrapWikiMsg( - "
\n$1\n
", - array( 'userjsyoucanpreview' ) - ); + if ( $this->isJsSubpage && $wgAllowUserJs ) { + $wgOut->wrapWikiMsg( + "
\n$1\n
", + array( 'userjsyoucanpreview' ) + ); + } } } } diff --git a/includes/Html.php b/includes/Html.php index 1e16e394..2e148140 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -546,17 +546,20 @@ class Html { } else { // Apparently we need to entity-encode \n, \r, \t, although the // spec doesn't mention that. Since we're doing strtr() anyway, - // and we don't need <> escaped here, we may as well not call - // htmlspecialchars(). + // we may as well not call htmlspecialchars(). // @todo FIXME: Verify that we actually need to // escape \n\r\t here, and explain why, exactly. # // We could call Sanitizer::encodeAttribute() for this, but we // don't because we're stubborn and like our marginal savings on // byte size from not having to encode unnecessary quotes. + // The only difference between this transform and the one by + // Sanitizer::encodeAttribute() is '<' is only encoded here if + // $wgWellFormedXml is set, and ' is not encoded. $map = array( '&' => '&', '"' => '"', + '>' => '>', "\n" => ' ', "\r" => ' ', "\t" => ' ' diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 2f8094ab..55b1da00 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2743,7 +2743,7 @@ $templates * call rather than a "