mediawiki-extensions-AbuseF.../extension.json
Bartosz Dziewoński 069e0c89a5 Provide page text and edit summary when filtering file uploads
This allows filters using `action='upload'` to use the variables
`summary`, `new_wikitext` and several others that previously were only
provided when editing pages (`action='edit'`).

This is achieved using the new UploadVerifyUpload hook, introduced in
MediaWiki core in change Ie68801b307de8456e1753ba54a29c34c8063bc36.

`action='upload'` is now only used when publishing an upload, and not
for uploads to stash. A new `action='stashupload'` is introduced,
which is used for all uploads, including uploads to stash. This
behaves like `action='upload'` used to, and only provides file
metadata variables.

Filter authors should use `action='stashupload'` when a file can be
checked based only on the file contents, and `action='upload'` only
when the wikitext edit needs to be examined too.

Bug: T87381
Bug: T89252
Bug: T139848
Change-Id: I9654f82ecda82e4917fd0ac6b364b947a1434c73
2016-07-09 13:31:15 +00:00

250 lines
7.9 KiB
JSON

{
"name": "Abuse Filter",
"author": [
"Andrew Garrett",
"River Tarnell",
"Victor Vasiliev",
"Marius Hoch"
],
"url": "https://www.mediawiki.org/wiki/Extension:AbuseFilter",
"descriptionmsg": "abusefilter-desc",
"license-name": "GPL-2.0+",
"type": "antispam",
"requires": {
"MediaWiki": ">= 1.25.0"
},
"AvailableRights": [
"abusefilter-modify",
"abusefilter-log-detail",
"abusefilter-view",
"abusefilter-log",
"abusefilter-private",
"abusefilter-modify-restricted",
"abusefilter-revert",
"abusefilter-view-private",
"abusefilter-log-private",
"abusefilter-hidden-log",
"abusefilter-hide-log",
"abusefilter-modify-global"
],
"SpecialPages": {
"AbuseLog": "SpecialAbuseLog",
"AbuseFilter": "SpecialAbuseFilter"
},
"LogTypes": [
"abusefilter"
],
"LogNames": {
"abusefilter": "abusefilter-log-name"
},
"LogHeaders": {
"abusefilter": "abusefilter-log-header"
},
"LogActions": {
"suppress/hide-afl": "abusefilter-logentry-suppress",
"suppress/unhide-afl": "abusefilter-logentry-unsuppress"
},
"LogActionsHandlers": {
"abusefilter/modify": [
"AbuseFilter",
"modifyActionText"
],
"abusefilter/hit": "AbuseLogHitFormatter"
},
"APIModules": {
"abusefilterchecksyntax": "ApiAbuseFilterCheckSyntax",
"abusefilterevalexpression": "ApiAbuseFilterEvalExpression",
"abusefilterunblockautopromote": "ApiAbuseFilterUnblockAutopromote",
"abusefiltercheckmatch": "ApiAbuseFilterCheckMatch"
},
"APIListModules": {
"abuselog": "ApiQueryAbuseLog",
"abusefilters": "ApiQueryAbuseFilters"
},
"MessagesDirs": {
"AbuseFilter": [
"i18n"
]
},
"ExtensionMessagesFiles": {
"AbuseFilterAliases": "AbuseFilter.alias.php"
},
"AutoloadClasses": {
"AbuseFilter": "AbuseFilter.class.php",
"AbuseFilterParser": "AbuseFilter.parser.php",
"AbuseFilterTokenizer": "AbuseFilterTokenizer.php",
"AbuseFilterHooks": "AbuseFilter.hooks.php",
"AbuseFilterPreAuthenticationProvider": "AbuseFilterPreAuthenticationProvider.php",
"SpecialAbuseLog": "special/SpecialAbuseLog.php",
"AbuseLogPager": "special/SpecialAbuseLog.php",
"SpecialAbuseFilter": "special/SpecialAbuseFilter.php",
"AbuseLogHitFormatter": "AbuseLogHitFormatter.php",
"AbuseFilterViewList": "Views/AbuseFilterViewList.php",
"AbuseFilterPager": "Views/AbuseFilterViewList.php",
"GlobalAbuseFilterPager": "Views/AbuseFilterViewList.php",
"AbuseFilterView": "Views/AbuseFilterView.php",
"AbuseFilterViewEdit": "Views/AbuseFilterViewEdit.php",
"AbuseFilterViewTools": "Views/AbuseFilterViewTools.php",
"AbuseFilterViewHistory": "Views/AbuseFilterViewHistory.php",
"AbuseFilterHistoryPager": "Views/AbuseFilterViewHistory.php",
"AbuseFilterViewRevert": "Views/AbuseFilterViewRevert.php",
"AbuseFilterViewTestBatch": "Views/AbuseFilterViewTestBatch.php",
"AbuseFilterViewExamine": "Views/AbuseFilterViewExamine.php",
"AbuseFilterExaminePager": "Views/AbuseFilterViewExamine.php",
"AbuseFilterChangesList": "Views/AbuseFilterView.php",
"AbuseFilterViewDiff": "Views/AbuseFilterViewDiff.php",
"TableDiffFormatterFullContext": "Views/AbuseFilterViewDiff.php",
"AbuseFilterViewImport": "Views/AbuseFilterViewImport.php",
"AbuseFilterVariableHolder": "AbuseFilterVariableHolder.php",
"AFComputedVariable": "AbuseFilterVariableHolder.php",
"AFPData": "AbuseFilter.parser.php",
"AFPException": "AbuseFilter.parser.php",
"AFPParserState": "AbuseFilter.parser.php",
"AFPToken": "AbuseFilter.parser.php",
"AFPUserVisibleException": "AbuseFilter.parser.php",
"ApiQueryAbuseLog": "api/ApiQueryAbuseLog.php",
"ApiQueryAbuseFilters": "api/ApiQueryAbuseFilters.php",
"ApiAbuseFilterCheckSyntax": "api/ApiAbuseFilterCheckSyntax.php",
"ApiAbuseFilterEvalExpression": "api/ApiAbuseFilterEvalExpression.php",
"ApiAbuseFilterUnblockAutopromote": "api/ApiAbuseFilterUnblockAutopromote.php",
"ApiAbuseFilterCheckMatch": "api/ApiAbuseFilterCheckMatch.php"
},
"ResourceModules": {
"ext.abuseFilter": {
"position": "top",
"styles": "ext.abuseFilter.css"
},
"ext.abuseFilter.edit": {
"scripts": "ext.abuseFilter.edit.js",
"messages": [
"abusefilter-edit-syntaxok",
"abusefilter-edit-syntaxerr",
"abusefilter-http-error",
"unknown-error"
],
"dependencies": [
"mediawiki.util",
"mediawiki.api",
"jquery.textSelection",
"jquery.spinner"
]
},
"ext.abuseFilter.tools": {
"scripts": "ext.abuseFilter.tools.js",
"messages": [
"abusefilter-reautoconfirm-notallowed",
"abusefilter-reautoconfirm-none",
"abusefilter-reautoconfirm-done",
"abusefilter-http-error",
"unknown-error"
],
"dependencies": [
"mediawiki.api",
"mediawiki.notify",
"user.tokens",
"jquery.spinner"
]
},
"ext.abuseFilter.examine": {
"scripts": "ext.abuseFilter.examine.js",
"messages": [
"abusefilter-examine-match",
"abusefilter-examine-nomatch",
"abusefilter-examine-syntaxerror",
"abusefilter-examine-notfound",
"abusefilter-mustbeeditor",
"abusefilter-http-error",
"unknown-error"
],
"dependencies": [
"jquery.spinner",
"mediawiki.api"
]
}
},
"ResourceFileModulePaths": {
"localBasePath": "modules",
"remoteExtPath": "AbuseFilter/modules"
},
"callback": "AbuseFilterHooks::onRegistration",
"Hooks": {
"EditFilterMergedContent": "AbuseFilterHooks::onEditFilterMergedContent",
"GetAutoPromoteGroups": "AbuseFilterHooks::onGetAutoPromoteGroups",
"AbortMove": "AbuseFilterHooks::onAbortMove",
"MovePageCheckPermissions": "AbuseFilterHooks::onMovePageCheckPermissions",
"ArticleDelete": "AbuseFilterHooks::onArticleDelete",
"RecentChange_save": "AbuseFilterHooks::onRecentChangeSave",
"ListDefinedTags": "AbuseFilterHooks::onListDefinedTags",
"ChangeTagsListActive": "AbuseFilterHooks::onChangeTagsListActive",
"LoadExtensionSchemaUpdates": "AbuseFilterHooks::onLoadExtensionSchemaUpdates",
"ContributionsToolLinks": "AbuseFilterHooks::onContributionsToolLinks",
"UploadVerifyFile": "AbuseFilterHooks::onUploadVerifyFile",
"UploadVerifyUpload": "AbuseFilterHooks::onUploadVerifyUpload",
"MakeGlobalVariablesScript": "AbuseFilterHooks::onMakeGlobalVariablesScript",
"ArticleSaveComplete": "AbuseFilterHooks::onArticleSaveComplete",
"UserMergeAccountFields": "AbuseFilterHooks::onUserMergeAccountFields",
"ParserOutputStashForEdit": "AbuseFilterHooks::onParserOutputStashForEdit",
"UnitTestsList": "AbuseFilterHooks::onUnitTestsList"
},
"config": {
"@doc": "see AbuseFilter.php",
"AbuseFilterActions": {
"flag": true,
"throttle": true,
"warn": true,
"disallow": true,
"blockautopromote": true,
"block": true,
"rangeblock": false,
"degroup": true,
"tag": true,
"_merge_strategy": "array_plus"
},
"AbuseFilterConditionLimit": 1000,
"AbuseFilterEmergencyDisableThreshold": {
"default": 0.05,
"_merge_strategy": "array_plus"
},
"AbuseFilterEmergencyDisableCount": {
"default": 2,
"_merge_strategy": "array_plus"
},
"AbuseFilterEmergencyDisableAge": {
"default": 86400,
"_merge_strategy": "array_plus"
},
"AbuseFilterParserClass": "AbuseFilterParser",
"AbuseFilterRestrictions": {
"flag": false,
"throttle": false,
"warn": false,
"disallow": false,
"blockautopromote": true,
"block": true,
"rangeblock": true,
"degroup": true,
"tag": false,
"_merge_strategy": "array_plus"
},
"AbuseFilterNotifications": false,
"AbuseFilterNotificationsPrivate": false,
"AbuseFilterCentralDB": null,
"AbuseFilterIsCentral": false,
"AbuseFilterDisallowGlobalLocalBlocks": false,
"AbuseFilterBlockDuration": "indefinite",
"AbuseFilterAnonBlockDuration": null,
"AbuseFilterCustomActionsHandlers": [],
"AbuseFilterValidGroups": [
"default"
],
"AbuseFilterDefaultWarningMessage": {
"default": "abusefilter-warning",
"_merge_strategy": "array_plus"
},
"AbuseFilterLogIPMaxAge": 7776000,
"AbuseFilterProfile": false
},
"load_composer_autoloader": true,
"manifest_version": 1
}