Merge "Deprecate $wgLegalTitleChars and $wgIllegalFileChars"

This commit is contained in:
jenkins-bot 2023-08-02 15:29:34 +00:00 committed by Gerrit Code Review
commit 2963ffc59d
5 changed files with 21 additions and 0 deletions

View file

@ -424,11 +424,13 @@ config-schema:
description: 'To disable file delete/restore temporarily'
IllegalFileChars:
default: ':\/\\'
deprecated: 'since 1.41; no longer customizable'
description: |-
Additional characters that are not allowed in filenames. They are replaced with '-' when
uploading. Like $wgLegalTitleChars, this is a regexp character class.
Slashes and backslashes are disallowed regardless of this setting, but included here for
completeness.
@deprecated since 1.41; no longer customizable
DeletedDirectory:
default: false
dynamicDefault:
@ -3861,6 +3863,7 @@ config-schema:
including those defined by other means.
LegalTitleChars:
default: ' %!"$&''()*,\-.\/0-9:;=?@A-Z\\^_`a-z~\x80-\xFF+'
deprecated: 'since 1.41; use Extension:TitleBlacklist to customize'
description: |-
Allowed title characters -- regex character class
Don't change this unless you know what you're doing
@ -3880,6 +3883,8 @@ config-schema:
passed in the query string rather than the path. This is a minor security issue
because articles can be created such that they are hard to view or edit.
In some rare cases you may wish to remove + for compatibility with old links.
@deprecated since 1.41; use Extension:TitleBlacklist or (soon)
Extension:AbuseFilter to customize this set.
CapitalLinks:
default: true
description: |-

View file

@ -253,6 +253,7 @@ $wgUploadMaintenance = null;
/**
* Config variable stub for the IllegalFileChars setting, for use by phpdoc and IDEs.
* @see MediaWiki\MainConfigSchema::IllegalFileChars
* @deprecated since 1.41; no longer customizable
*/
$wgIllegalFileChars = null;
@ -2163,6 +2164,7 @@ $wgNamespaceAliases = null;
/**
* Config variable stub for the LegalTitleChars setting, for use by phpdoc and IDEs.
* @see MediaWiki\MainConfigSchema::LegalTitleChars
* @deprecated since 1.41; use Extension:TitleBlacklist to customize
*/
$wgLegalTitleChars = null;

View file

@ -268,6 +268,7 @@ class MainConfigNames {
/**
* Name constant for the IllegalFileChars setting, for use with Config::get()
* @see MainConfigSchema::IllegalFileChars
* @deprecated since 1.41; no longer customizable
*/
public const IllegalFileChars = 'IllegalFileChars';
@ -2178,6 +2179,7 @@ class MainConfigNames {
/**
* Name constant for the LegalTitleChars setting, for use with Config::get()
* @see MainConfigSchema::LegalTitleChars
* @deprecated since 1.41; use Extension:TitleBlacklist to customize
*/
public const LegalTitleChars = 'LegalTitleChars';

View file

@ -901,9 +901,12 @@ class MainConfigSchema {
*
* Slashes and backslashes are disallowed regardless of this setting, but included here for
* completeness.
*
* @deprecated since 1.41; no longer customizable
*/
public const IllegalFileChars = [
'default' => ':\\/\\\\',
'deprecated' => 'since 1.41; no longer customizable',
];
/**
@ -6093,9 +6096,12 @@ class MainConfigSchema {
* because articles can be created such that they are hard to view or edit.
*
* In some rare cases you may wish to remove + for compatibility with old links.
* @deprecated since 1.41; use Extension:TitleBlacklist or (soon)
* Extension:AbuseFilter to customize this set.
*/
public const LegalTitleChars = [
'default' => ' %!"$&\'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+',
'deprecated' => 'since 1.41; use Extension:TitleBlacklist to customize',
];
/**

View file

@ -3180,6 +3180,9 @@ return [
'UploadStashScalerBaseUrl' => [
'deprecated' => 'since 1.36 Use thumbProxyUrl in $wgLocalFileRepo',
],
'IllegalFileChars' => [
'deprecated' => 'since 1.41; no longer customizable',
],
'ThumbnailNamespaces' => [
'items' => [
'type' => 'integer',
@ -3206,6 +3209,9 @@ return [
'type' => 'string',
],
],
'LegalTitleChars' => [
'deprecated' => 'since 1.41; use Extension:TitleBlacklist to customize',
],
'AllowImageTag' => [
'deprecated' => 'since 1.35; register an extension tag named <img> instead.',
],