Move CSRF token handling into MediaWiki\Session\Session
[lhc/web/wiklou.git] / RELEASE-NOTES-1.27
1 Security reminder: If you have PHP's register_globals option set, you must
2 turn it off. MediaWiki will not work with it enabled.
3
4 == MediaWiki 1.27 ==
5
6 THIS IS NOT A RELEASE YET
7
8 MediaWiki 1.27 is an alpha-quality branch and is not recommended for use in
9 production.
10
11 === Configuration changes in 1.27 ===
12 * $wgUseLinkNamespaceDBFields was removed.
13 * Deprecated $wgResourceLoaderMinifierStatementsOnOwnLine and
14 $wgResourceLoaderMinifierMaxLineLength, because there was little value in
15 making the behavior configurable. The default values (`false` for the former,
16 1000 for the latter) are now hard-coded.
17 * $wgDebugDumpSqlLength was removed (deprecated in 1.24).
18 * $wgDebugDBTransactions was removed (deprecated in 1.20).
19 * $wgUseXVO has been removed, as it provides functionality only used by
20 custom Wikimedia patches against Squid 2.x that probably noone uses in
21 production anymore. There is now $wgUseKeyHeader that provides similar
22 functionality but instead of the MediaWiki-specific X-Vary-Options header,
23 uses the draft Key header standard.
24 * $wgScriptExtension (and support for '.php5' entry points) was removed. See the
25 deprecation notice in the release notes for version 1.25 for advice on how to
26 preserve support for '.php5' entry points via URL rewriting.
27 * Password handling via the User object has been deprecated and partially
28 removed, pending the future introduction of AuthManager. In particular:
29 ** expirePassword(), getPasswordExpireDate(), resetPasswordExpiration(), and
30 getPasswordExpired() have been removed. They were unused outside of core.
31 ** The mPassword, mNewpassword, mNewpassTime, and mPasswordExpires fields are
32 now private and will be removed in the future.
33 ** The getPassword() and getTemporaryPassword() methods now throw
34 BadMethodCallException and will be removed in the future.
35 ** The ability to pass 'password' and 'newpassword' to createNew() has been
36 removed. The only users of it seem to have been using it to set invalid
37 passwords, and so shouldn't be greatly affected.
38 ** setPassword(), setInternalPassword(), and setNewpassword() have been
39 deprecated, pending the introduction of AuthManager.
40 ** User::randomPassword() is deprecated in favor of a new method
41 PasswordFactory::generateRandomPasswordString()
42 ** User::getPasswordFactory() is deprecated, callers should just create a
43 PasswordFactory themselves.
44 ** A new constructor, User::newSystemUser(), has been added to simplify the
45 creation of passwordless "system" users for logged actions.
46 * $wgMaxSquidPurgeTitles was removed.
47 * $wgAjaxWatch was removed. This is now enabled by default.
48 * $wgUseInstantCommons now hotlinks Commons images by default instead of
49 downloading originals and thumbnailing them locally. This allows wikis to save
50 on CPU and bandwidth while reducing time to first byte for pages, even without
51 a thumbnail handler. See $wgForeignFileRepos documentation for tweaks.
52 * (T27397) WebP is enabled by default as an uploadable filetype.
53 * (T48998) $wgArticlePath must now be either a full url, or start with a "/".
54 * $wgRateLimitLog was removed; use $wgDebugLogGroups['ratelimit'] instead.
55 * Deprecated API formats dbg, txt, and yaml have been removed.
56 * CLDRPluralRule* classes have been replaced with
57 wikimedia/cldr-plural-rule-parser.
58 * Removed $wgProfilePerHost, $wgUDPProfilerHost, $wgUDPProfilerPort,
59 $wgUDPProfilerFormatString, $wgStatsMethod, $wgAggregateStatsID,
60 $wgStatsFormatString, and $wgProfileCallTree (deprecated since 1.20).
61 * For proper operation of LocalIdLookup with shared user tables, ensure that
62 $wgSharedDB and $wgSharedTables are properly set even on the "central" wiki
63 that all others are sharing from and that $wgLocalDatabases is set to the
64 full list of sharing wikis on all those wikis.
65 * Massive overhaul to session handling:
66 ** $wgSessionsInObjectCache is no longer supported and must be true, due to
67 MediaWiki\Session\SessionManager. $wgSessionHandler is similarly no longer
68 used.
69 ** ObjectCacheSessionHandler is removed, replaced with
70 MediaWiki\Session\PhpSessionHandler.
71 ** PHP session handling in general ($_SESSION, session_id(), and so on) is
72 deprecated. Use MediaWiki\Session\SessionManager instead. A new config
73 variable, $wgPHPSessionHandling, is available to cause use of $_SESSION to
74 issue a deprecation warning or to cause most PHP session handling to throw
75 exceptions.
76 ** Deprecated UserSetCookies hook. Session-handling extensions should generally
77 be creating a custom subclass of CookieSessionProvider. Other extensions
78 messing with cookies can no longer count on user data being saved in cookies
79 versus other methods.
80 ** Deprecated UserLoadFromSession hook, extensions should create a
81 MediaWiki\Session\SessionProvider.
82 ** The User cannot be loaded from session until after Setup.php completes.
83 Attempts to do so will be ignored and the User will remain unloaded.
84 ** CSRF tokens may be fetched from the MediaWiki\Session\Session, which uses
85 the MediaWiki\Session\Token class.
86 * MediaWiki will now auto-create users as necessary, removing the need for
87 extensions to do so. An 'autocreateaccount' right is added to allow
88 auto-creation when 'createaccount' is not granted to all users.
89 * Deprecated AuthPluginAutoCreate hook in favor of LocalUserCreated.
90 * Most cookie-handling methods in User are deprecated.
91 * $wgAllowAsyncCopyUploads and $CopyUploadAsyncTimeout were removed. This was an
92 experimental feature that has never worked.
93 * Login and createaccount tokens now vary by timestamp.
94 * LoginForm::getLoginToken() and LoginForm::getCreateaccountToken()
95 return a MediaWiki\Session\Token, and tokens must be checked using that
96 class's methods.
97
98 === New features in 1.27 ===
99 * $wgDataCenterId and $wgDataCenterRoles where added, which will serve as
100 basic configuration settings needed for multi-datacenter setups.
101 $wgDataCenterUpdateStickTTL was also added.
102 * Added a new hook, 'UserMailerTransformContent', to transform the contents
103 of an email. This is similar to the EmailUser hook but applies to all mail
104 sent via UserMailer.
105 * Added a new hook, 'UserMailerTransformMessage', to transform the contents
106 of an emai after MIME encoding.
107 * Added a new hook, 'UserMailerSplitTo', to control which users have to be
108 emailed separately (ie. there is a single address in the To: field) so
109 user-specific changes to the email can be applied safely.
110 * $wgCdnMaxageLagged was added, which limits the CDN cache TTL
111 when any load balancer uses a DB that is lagged beyond the 'max lag'
112 setting in the relevant section of $wgLBFactoryConf.
113 * User::newSystemUser() may be used to simplify the creation of passwordless
114 "system" users for logged actions from scripts and extensions.
115 * Extensions can now return detailed error information via the API when
116 preventing user actions using 'getUserPermissionsErrors' and similar hooks
117 by using ApiMessage instances instead of strings for the $result value.
118 * $wgAPIMaxLagThreshold was added to limit bot changes when databases lag
119 becomes too high.
120 * Skins and extensions can now use FlexBox mixins (.flex-display(@display: flex)
121 and .flex(@grow: 1, @shrink: 1, @width: auto, @order: 1)) in Less to create
122 cross-browser-compatible FlexBox rules. Users will still need to add fallback
123 float rules or the like for compatibility with IE9- separately.
124 * Added MWTimestamp::getTimezoneString() which returns the localized timezone
125 string, if available. To localize this string, see the comments of
126 $wgLocaltimezone in includes/DefaultSettings.php.
127 * Added CentralIdLookup, a service that allows extensions needing a concept of
128 "central" users to get that without having to know about specific central
129 authentication extensions.
130 * $wgMaxUserDBWriteDuration added to limit huge user-generated transactions.
131 Regular web request transactions that takes longer than this are aborted.
132 * Added a new hook, 'TitleMoveCompleting', which runs before a page move is
133 committed.
134 * $wgCdnReboundPurgeDelay was added to provide secondary delayed purges of URLs
135 from CDN to mitigate DB replication lag and WAN cache purge lag.
136 * (T49162) Installer will default to setting CACHE_ACCEL as the main cache type
137 if it is available.
138 * It is now possible to patrol file uploads (both for new files and new versions
139 of existing files). Special:NewFiles has gained an option to filter by patrol
140 status. This functionality can be disabled using $wgUseFilePatrol.
141 * MediaWiki\Session infrastructure allows for easier use of session mechanisms
142 other than the usual cookies.
143 ** SessionMetadata and SessionCheckInfo hooks allow for setting and checking
144 custom session metadata.
145 * Added MWGrants and associated configuration settings $wgGrantPermissions and
146 $wgGrantPermissionGroups to hold configuration for authentication features
147 such as OAuth that want to allow restricting the user rights a user may make
148 use of.
149 ** If you're already using the OAuth extension, these new variables are
150 identical to (and will replace) $wgMWOAuthGrantPermissions and
151 $wgMWOAuthGrantPermissionGroups.
152 * Added MWRestrictions as a class to check restrictions on a WebRequest, e.g.
153 to assert that the request comes from a particular IP range.
154 * Added bot passwords, a rights-restricted login mechanism for API-using bots.
155
156 === External library changes in 1.27 ===
157
158 ==== Upgraded external libraries ====
159 * Updated oojs/oojs-ui from v0.12.12 to v0.13.3.
160 * Updated composer/semver from v1.0.0 to v1.2.0.
161 * Update liuggio/statsd-php-client to 1.0.18.
162
163 ==== New external libraries ====
164 * Added wikimedia/base-convert v1.0.1.
165 * Added wikimedia/cldr-plural-rule-parser v1.0.0.
166 * Added wikimedia/relpath v1.0.3.
167 * Added wikimedia/running-stat v1.1.0.
168 * Added wikimedia/php-session-serializer v1.0.3.
169
170 ==== Removed and replaced external libraries ====
171
172 === Bug fixes in 1.27 ===
173 * Special:Upload will now display correct maximum allowed file size when running
174 under HHVM (T116347).
175
176 === Action API changes in 1.27 ===
177 * Added list=allrevisions.
178 * generator=recentchanges now has the option to generate revids.
179 * ApiPageSet::setRedirectMergePolicy() was added. This allows generator
180 modules to define how generator data for a redirect source gets merged
181 into the redirect destination.
182 * prop=imageinfo&iiprop=uploadwarning will no longer include the possibility of
183 "was-deleted" warning.
184 * Added difftotextpst to query=revisions which preforms a pre-save transform on
185 the text before diffing it.
186 * Deprecated formats dbg, txt, and yaml have been removed.
187 * (T47988) The protect log event details now use new-style formatting.
188 * The following response properties from action=login are deprecated, and may
189 be removed in the future: lgtoken, cookieprefix, sessionid. Clients should
190 handle cookies to properly manage session state.
191 * action=login transparently allows login using bot passwords. Clients should
192 merely need to change the username and password used after setting up a bot
193 password.
194 * action=upload no longer understands statuskey, asyncdownload or leavemessage.
195
196 === Action API internal changes in 1.27 ===
197 * ApiQueryORM removed.
198 * The following classes have been removed:
199 ** ApiFormatDbg
200 ** ApiFormatTxt
201 ** ApiFormatYaml
202 * ApiQueryBase::titleToKey(), ApiQueryBase::keyToTitle() and
203 ApiQueryBase::keyPartToTitle() all removed (deprecated since 1.24).
204 * ApiQueryBase::checkRowCount() was removed (deprecated since 1.24).
205 * ApiQueryBase::getDirectionDescription() was removed (deprecated since 1.25).
206 * ApiQuery::getModules() was removed (deprecated since 1.21).
207 * ApiMain::getModules() was removed (deprecated since 1.21).
208
209 === Languages updated in 1.27 ===
210
211 MediaWiki supports over 350 languages. Many localisations are updated
212 regularly. Below only new and removed languages are listed, as well as
213 changes to languages because of Phabricator reports.
214
215 * (T113688) Change default numerals from Gurmukhi to Arabic for Punjabi locale.
216
217 === Other changes in 1.27 ===
218 * ProfilerOutputUdp was removed. Note that there is a ProfilerOutputStats class.
219 * WikiPage::doDeleteArticleReal() and WikiPage::doDeleteArticle() now
220 ignore the 2nd and 3rd arguments (formerly $id and $commit).
221 * Removed "loaderScripts" option from ResourceLoaderFileModule class.
222 * Removed ORM-like wrapper added in 1.20.
223 * LinkCache::getGoodLinks and LinkCache::getBadLinks were removed
224 (deprecated in 1.26).
225 * WikiPage::doQuickEdit() was removed (deprecated since 1.21).
226 * Removed SiteObject and SiteArray classes (deprecated in 1.21).
227 * MessageBlobStore::getInstance() was removed (deprecated since 1.25).
228 * (T84937) Free external links ("autolinked" urls) will now be terminated
229 by &nbsp; and HTML entity encodings of &nbsp, <, and >.
230 * (T36948) The default file revert message's timestamp is now in
231 $wgLocaltimezone, instead of UTC.
232 * The default name of the 'suppress' group page has been changed from
233 'Project:Oversight' to 'Project:Suppress'.
234 * DatabaseBase::resultObject() is now protected (use outside Database classes
235 not necessary since 1.11).
236 * Calling ResourceLoaderFileModule::readStyleFiles() without a
237 ResourceLoaderContext instance is deprecated.
238 * ResourceLoader::getLessCompiler() now takes an optional parameter of
239 additional LESS variables to set for the compiler.
240 * wfBaseConvert() marked as deprecated, use Wikimedia\base_convert() directly
241 instead.
242 * Obsolete maintenance scripts clearCacheStats.php and showCacheStats.php
243 were removed. The underlying data is sent to StatsD (see $wgStatsdServer).
244 * Removed msg_resource_links database table and associated code.
245 * Removed msg_resource database table and associated code.
246 * Skin::getNamespaceNotice() was removed.
247 * wfIsConfiguredProxy() was removed (deprecated since 1.24).
248 * wfDebugTimer() was removed (deprecated since 1.25).
249 * wfIsTrustedProxy() was removed (deprecated since 1.24).
250 * wfGetIP() was removed (deprecated since 1.19).
251 * MWHookException was removed.
252 * OutputPage::appendSubtitle() was removed (deprecated since 1.19).
253 * OutputPage::loginToUse() was removed (deprecated since 1.19).
254 * Article::loadContent() was removed (deprecated since 1.19).
255 * User::editToken() was removed (deprecated since 1.19).
256 * Removed --force-normal option of dumpBackup.php, as it no longer served
257 any useful purpose since 1.22.
258 * The functions processOption() and processArgs() on the BackupDumper and
259 TextPassDumper classes have been removed.
260 * The maintenance/backupTextPass.inc file was deleted. You should include
261 maintenance/dumpTextPass.php instead.
262 * WikiPage::getUsedTemplates() was removed (deprecated since 1.19).
263 * wfEmptyMsg() was removed (deprecated since 1.18).
264 * OutputPage::permissionRequired() was removed (deprecated since 1.18).
265 * OutputPage::blockedPage() was removed (deprecated since 1.18).
266 * User::getSkin() was removed (deprecated since 1.18).
267 * OutputPage::includeJQuery() was removed (deprecated since 1.17).
268 * WikiPage::updateRestrictions() was removed (deprecated since 1.19).
269 * WikiPage::testPreSaveTransform() was removed (deprecated since 1.19).
270 * LogPage::logName() was removed (deprecated since 1.19).
271 * LogPage::logHeader() was removed (deprecated since 1.19).
272 * wfCheckLimits() was removed (deprecated since 1.24).
273 * Linker::makeKnownLinkObj() was removed (deprecated since 1.16).
274 * Linker::makeLinkObj() was removed (deprecated since 1.16).
275 * wfMsgForContentNoTrans() was removed (deprecated since 1.18).
276 * ChangesList::usePatrol was removed (deprecated since 1.22).
277 * wfMsgNoTrans() was removed (deprecated since 1.18).
278 * Linker::makeImageLink2 was removed (deprecated since 1.20).
279 * Title::userIsWatching() was removed (deprecated since 1.20).
280 * Removed WaitForSlave maintenance script; use SELECT MASTER_POS_WAIT()
281 database function directly instead.
282 * wfMsg() was removed (deprecated since 1.18).
283 * wfMsgForContent() was removed (deprecated since 1.18).
284 * wfMsgReal() was removed (deprecated since 1.18).
285 * wfMsgGetKey() was removed (deprecated since 1.18).
286 * wfMsgHtml() was removed (deprecated since 1.18).
287 * wfMsgWikiHtml() was removed (deprecated since 1.18).
288 * wfMsgExt() was removed (deprecated since 1.18).
289 * Language::armourMath() was removed (deprecated since 1.22).
290 * LanguageConverter::armourMath() was removed (deprecated since 1.22).
291 * FakeConverter::armourMath() was removed (deprecated since 1.22).
292 * The unused jquery.validate ResourceLoader module was removed.
293 * FileRepo::getRootUrl() was removed (deprecated since 1.20).
294 * User::generateToken() was removed (deprecated since 1.20).
295 * WikiPage::getRawText() was removed (deprecated since 1.21).
296 * ParserOutput::hasCustomDataUpdates() was removed (deprecated since 1.25).
297 * ParserOutput::addSecondaryDataUpdate() was removed (deprecated since 1.25).
298 * ParserOutput::getSecondaryDataUpdates() was removed (deprecated since 1.25).
299 * Gallery images with multiple caption pipes no longer concatenate them all
300 together but instead pick the final one, similar to image syntax.
301 * XML-like parser tags (such as <gallery>), when unclosed, will be left unparsed
302 rather than consume everything until the end of the page.
303
304 == Compatibility ==
305
306 MediaWiki 1.27 requires PHP 5.3.3 or later. There is experimental support for
307 HHVM 3.6.5 or later.
308
309 MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but
310 support for them is somewhat less mature. There is experimental support for
311 Oracle and Microsoft SQL Server.
312
313 The supported versions are:
314
315 * MySQL 5.0.3 or later
316 * PostgreSQL 8.3 or later
317 * SQLite 3.3.7 or later
318 * Oracle 9.0.1 or later
319 * Microsoft SQL Server 2005 (9.00.1399)
320
321 == Upgrading ==
322
323 1.27 has several database changes since 1.26, and will not work without schema
324 updates. Note that due to changes to some very large tables like the revision
325 table, the schema update may take quite long (minutes on a medium sized site,
326 many hours on a large site).
327
328 If upgrading from before 1.11, and you are using a wiki as a commons
329 repository, make sure that it is updated as well. Otherwise, errors may arise
330 due to database schema changes.
331
332 If upgrading from before 1.7, you may want to run refreshLinks.php to ensure
333 new database fields are filled with data.
334
335 If you are upgrading from MediaWiki 1.4.x or earlier, you should upgrade to
336 1.5 first. The upgrade script maintenance/upgrade1_5.php has been removed
337 with MediaWiki 1.21.
338
339 Don't forget to always back up your database before upgrading!
340
341 See the file UPGRADE for more detailed upgrade instructions.
342
343 For notes on 1.26.x and older releases, see HISTORY.
344
345 == Online documentation ==
346
347 Documentation for both end-users and site administrators is available on
348 MediaWiki.org, and is covered under the GNU Free Documentation License (except
349 for pages that explicitly state that their contents are in the public domain):
350
351 https://www.mediawiki.org/wiki/Documentation
352
353 == Mailing list ==
354
355 A mailing list is available for MediaWiki user support and discussion:
356
357 https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
358
359 A low-traffic announcements-only list is also available:
360
361 https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
362
363 It's highly recommended that you sign up for one of these lists if you're
364 going to run a public MediaWiki, so you can be notified of security fixes.
365
366 == IRC help ==
367
368 There's usually someone online in #mediawiki on irc.freenode.net.