Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F31937039
T258134.patch
Ammarpad
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
Ammarpad
Jul 16 2020, 9:15 AM
2020-07-16 09:15:47 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
T258134.patch
View Options
From d95ef3a9dc8be24bc44a3426d87b1ba3f3e2ef01 Mon Sep 17 00:00:00 2001
From: Ammar Abdulhamid <ammarpad@yahoo.com>
Date: Thu, 16 Jul 2020 10:03:42 +0100
Subject: [PATCH] Fix config variables regex concatenation
Bug: T258134
Change-Id: I78a59a62822c826f998971588609973603299039
---
includes/UrlShortenerUtils.php | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/includes/UrlShortenerUtils.php b/includes/UrlShortenerUtils.php
index f491c15..0f1fd63 100644
--- a/includes/UrlShortenerUtils.php
+++ b/includes/UrlShortenerUtils.php
@@ -353,7 +353,13 @@ class UrlShortenerUtils {
: []
) );
- $allowedDomains = $allowedDomainsOld . '|' . $allowedDomainsNew;
+ if ( $wgUrlShortenerDomainsWhitelist && !$wgUrlShortenerAllowedDomains ) {
+ $allowedDomains = $allowedDomainsOld;
+ } elseif ( $wgUrlShortenerAllowedDomains && !$wgUrlShortenerDomainsWhitelist ) {
+ $allowedDomains = $allowedDomainsNew;
+ } else {
+ $allowedDomains = $allowedDomainsOld . '|' . $allowedDomainsNew;
+ }
}
return $allowedDomains;
--
2.23.0
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8475753
Default Alt Text
T258134.patch (1 KB)
Attached To
Mode
T258134: UrlShortener is shortening URLs from all domains
Attached
Detach File
Event Timeline
Log In to Comment