From 73cf68f21713686d1b9549a72da34a3ff0d81882 Mon Sep 17 00:00:00 2001 From: Lens0021 / Leslie Date: Sun, 13 Oct 2024 12:55:42 +0900 Subject: [PATCH] femiwiki: Import from hotfixes (#873) https://github.com/femiwiki/nomad/blob/ea7a57e0f4379405970f19793f876f5784c850fc/jobs/fastcgi.nomad#L240-L278 --- dockers/femiwiki/LocalSettings.php | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/dockers/femiwiki/LocalSettings.php b/dockers/femiwiki/LocalSettings.php index 09a78b00..77b78601 100644 --- a/dockers/femiwiki/LocalSettings.php +++ b/dockers/femiwiki/LocalSettings.php @@ -119,7 +119,7 @@ 'handlers' => [ 'stream' => [ 'class' => '\\Monolog\\Handler\\StreamHandler', - 'args' => [ 'php://stdout' ], + 'args' => [ 'php://stdout', 'info' ], 'formatter' => 'json' ], ], @@ -180,6 +180,8 @@ // Path to the GNU diff3 utility. Used for conflict resolution. $wgDiff3 = '/usr/bin/diff3'; +$wgBlockTargetMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD; + // Default skin: you can change the default skin. Use the internal symbolic // names, ie 'vector', 'monobook': $wgDefaultSkin = 'femiwiki'; @@ -249,6 +251,14 @@ // Permission $wgGroupPermissions['*']['createaccount'] = true; +$wgGroupPermissions['user']['flow-hide'] = false; +$wgGroupPermissions['user']['flow-lock'] = false; +$wgGroupPermissions['user']['editcontentmodel'] = false; +$wgGroupPermissions['user']['move'] = false; +$wgGroupPermissions['autoconfirmed']['flow-hide'] = true; +$wgGroupPermissions['autoconfirmed']['flow-lock'] = true; +$wgGroupPermissions['autoconfirmed']['editcontentmodel'] = true; +$wgGroupPermissions['autoconfirmed']['move'] = true; $wgGroupPermissions['sysop']['renameuser'] = true; $wgGroupPermissions['sysop']['interwiki'] = true; $wgGroupPermissions['sysop']['import'] = false; @@ -266,6 +276,7 @@ $wgGroupPermissions['blocker']['block'] = true; $wgGroupPermissions['blocker']['blockemail'] = true; $wgGroupPermissions['blocker']['unblockself'] = true; +$wgGroupPermissions['rollbacker']['rollback'] = true; // FemiwikiTeam is just a list of all Femiwiki team member $wgGroupPermissions['femiwiki-team']['editprotected'] = true; @@ -390,7 +401,10 @@ // AbuseFilter wfLoadExtension( 'AbuseFilter' ); +$wgAbuseFilterEnableBlockedExternalDomain = true; $wgGroupPermissions['sysop']['abusefilter-modify'] = false; +$wgGroupPermissions['abusefilter']['abusefilter-bypass-blocked-external-domains'] = true; +$wgGroupPermissions['abusefilter']['abusefilter-modify-blocked-external-domains'] = true; $wgGroupPermissions['abusefilter']['abusefilter-modify'] = true; $wgGroupPermissions['abusefilter']['changetags'] = true; $wgGroupPermissions['abusefilter']['managechangetags'] = true; @@ -799,18 +813,24 @@ wfLoadExtension( 'Scribunto' ); $wgScribuntoDefaultEngine = 'luasandbox'; $wgScribuntoEngineConf['luasandbox']['cpuLimit'] = 3; -$wgScribuntoEngineConf['luasandbox']['memoryLimit'] = 10485760; +$wgScribuntoEngineConf['luasandbox']['memoryLimit'] = 52428800; # 50 MiB // SecureLinkFixer wfLoadExtension( 'SecureLinkFixer' ); // SpamBlacklist wfLoadExtension( 'SpamBlacklist' ); -// Empty Meta-Wiki blacklist $wgBlacklistSettings = [ 'spam' => [ - 'files' => [] - ] + 'files' => [ + "https://meta.wikimedia.org/w/index.php?title=Spam_blacklist&action=raw&sb_ver=1", + ], + ], + 'email' => [ + 'files' => [ + "https://meta.wikimedia.org/w/index.php?title=Email_blacklist&action=raw&sb_ver=1", + ], + ], ]; // SyntaxHighlight