Passed
Push — master ( f2d44b...075a0b )
by Roeland
17:45 queued 07:26
created
lib/private/Security/TrustedDomainHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 			return true;
83 83
 		}
84 84
 		// Reject misformed domains in any case
85
-		if (strpos($domain,'-') === 0 || strpos($domain,'..') !== false) {
85
+		if (strpos($domain, '-') === 0 || strpos($domain, '..') !== false) {
86 86
 			return false;
87 87
 		}
88 88
 		// Match, allowing for * wildcards
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 			if (gettype($trusted) !== 'string') {
91 91
 				break;
92 92
 			}
93
-			$regex = '/^' . implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/i';
93
+			$regex = '/^'.implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))).'$/i';
94 94
 			if (preg_match($regex, $domain) || preg_match($regex, $domainWithPort)) {
95 95
  				return true;
96 96
  			}
Please login to merge, or discard this patch.