Passed
Push — dependabot/composer/newinterna... ( 13eb18 )
by
unknown
04:37
created
redir.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -7,43 +7,43 @@
 block discarded – undo
7 7
  ******************************************************************************/
8 8
 
9 9
 $toolList = array(
10
-    'tparis-pcount'      => '//tools.wmflabs.org/supercount/index.php?user=%DATA%&project=en.wikipedia',
11
-    'luxo-contributions' => '//tools.wmflabs.org/quentinv57-tools/tools/globalcontribs.php?username=%DATA%',
12
-    'guc'                => '//tools.wmflabs.org/guc/?user=%DATA%',
13
-    'oq-whois'           => 'https://whois.domaintools.com/%DATA%',
10
+	'tparis-pcount'      => '//tools.wmflabs.org/supercount/index.php?user=%DATA%&project=en.wikipedia',
11
+	'luxo-contributions' => '//tools.wmflabs.org/quentinv57-tools/tools/globalcontribs.php?username=%DATA%',
12
+	'guc'                => '//tools.wmflabs.org/guc/?user=%DATA%',
13
+	'oq-whois'           => 'https://whois.domaintools.com/%DATA%',
14 14
 	'tl-whois'           => 'https://tools.wmflabs.org/whois/gateway.py?lookup=true&ip=%DATA%',
15
-    'sulutil'            => '//tools.wmflabs.org/quentinv57-tools/tools/sulinfo.php?showinactivity=1&showblocks=1&username=%DATA%',
16
-    'google'             => 'https://www.google.com/search?q=%DATA%',
17
-    'domain'             => 'http://%DATA%/',
15
+	'sulutil'            => '//tools.wmflabs.org/quentinv57-tools/tools/sulinfo.php?showinactivity=1&showblocks=1&username=%DATA%',
16
+	'google'             => 'https://www.google.com/search?q=%DATA%',
17
+	'domain'             => 'http://%DATA%/',
18 18
 );
19 19
 
20 20
 if (!isset($_GET['tool'])
21
-    || !isset($toolList[$_GET['tool']])
22
-    || !isset($_GET['data'])
21
+	|| !isset($toolList[$_GET['tool']])
22
+	|| !isset($_GET['data'])
23 23
 ) {
24
-    header("HTTP/1.1 403 Forbidden");
24
+	header("HTTP/1.1 403 Forbidden");
25 25
 
26
-    return;
26
+	return;
27 27
 }
28 28
 
29 29
 if (isset($_GET['round2'])) {
30
-    $data = $_GET['data'];
31
-    $tool = $_GET['tool'];
30
+	$data = $_GET['data'];
31
+	$tool = $_GET['tool'];
32 32
 
33
-    if ($tool === 'domain') {
34
-        // quick security check - if you want to exploit something, you better be sure your exploit resolves via dns.
35
-        // this is not intended to catch everything, just as a quick sanity check.
36
-        if (gethostbyname($data) == $data) {
37
-            echo 'Error resolving hostname, it doesn\'t look like this domain exists.';
38
-            die();
39
-        }
40
-    }
41
-    else {
42
-        $data = htmlentities($data, ENT_COMPAT, 'UTF-8');
43
-    }
33
+	if ($tool === 'domain') {
34
+		// quick security check - if you want to exploit something, you better be sure your exploit resolves via dns.
35
+		// this is not intended to catch everything, just as a quick sanity check.
36
+		if (gethostbyname($data) == $data) {
37
+			echo 'Error resolving hostname, it doesn\'t look like this domain exists.';
38
+			die();
39
+		}
40
+	}
41
+	else {
42
+		$data = htmlentities($data, ENT_COMPAT, 'UTF-8');
43
+	}
44 44
 
45
-    echo '<script>window.location.href="' . str_replace("%DATA%", $data, $toolList[$tool]) . '"</script>';
45
+	echo '<script>window.location.href="' . str_replace("%DATA%", $data, $toolList[$tool]) . '"</script>';
46 46
 }
47 47
 else {
48
-    header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
48
+	header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
49 49
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,13 +37,11 @@
 block discarded – undo
37 37
             echo 'Error resolving hostname, it doesn\'t look like this domain exists.';
38 38
             die();
39 39
         }
40
-    }
41
-    else {
40
+    } else {
42 41
         $data = htmlentities($data, ENT_COMPAT, 'UTF-8');
43 42
     }
44 43
 
45 44
     echo '<script>window.location.href="' . str_replace("%DATA%", $data, $toolList[$tool]) . '"</script>';
46
-}
47
-else {
45
+} else {
48 46
     header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
49 47
 }
Please login to merge, or discard this patch.
config.inc.php 1 patch
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -196,24 +196,24 @@  discard block
 block discarded – undo
196 196
 
197 197
 // request states
198 198
 $availableRequestStates = array(
199
-    'Open'          => array(
200
-        'defertolog' => 'users', // don't change or you'll break old logs
201
-        'deferto'    => 'users',
202
-        'header'     => 'Open requests',
203
-        'api'        => "open",
204
-    ),
205
-    'Flagged users' => array(
206
-        'defertolog' => 'flagged users', // don't change or you'll break old logs
207
-        'deferto'    => 'flagged users',
208
-        'header'     => 'Flagged user needed',
209
-        'api'        => "admin",
210
-    ),
211
-    'Checkuser'     => array(
212
-        'defertolog' => 'checkusers', // don't change or you'll break old logs
213
-        'deferto'    => 'checkusers',
214
-        'header'     => 'Checkuser needed',
215
-        'api'        => "checkuser",
216
-    ),
199
+	'Open'          => array(
200
+		'defertolog' => 'users', // don't change or you'll break old logs
201
+		'deferto'    => 'users',
202
+		'header'     => 'Open requests',
203
+		'api'        => "open",
204
+	),
205
+	'Flagged users' => array(
206
+		'defertolog' => 'flagged users', // don't change or you'll break old logs
207
+		'deferto'    => 'flagged users',
208
+		'header'     => 'Flagged user needed',
209
+		'api'        => "admin",
210
+	),
211
+	'Checkuser'     => array(
212
+		'defertolog' => 'checkusers', // don't change or you'll break old logs
213
+		'deferto'    => 'checkusers',
214
+		'header'     => 'Checkuser needed',
215
+		'api'        => "checkuser",
216
+	),
217 217
 );
218 218
 
219 219
 $defaultRequestStateKey = 'Open';
@@ -252,21 +252,21 @@  discard block
 block discarded – undo
252 252
 require_once('config.local.inc.php');
253 253
 
254 254
 $cDatabaseConfig = array(
255
-    "acc"           => array(
256
-        "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database,
257
-        "username" => $toolserver_username,
258
-        "password" => $toolserver_password,
259
-    ),
260
-    "wikipedia"     => array(
261
-        "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db,
262
-        "username" => $toolserver_username,
263
-        "password" => $toolserver_password,
264
-    ),
265
-    "notifications" => array(
266
-        "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database,
267
-        "username" => $notifications_username,
268
-        "password" => $notifications_password,
269
-    ),
255
+	"acc"           => array(
256
+		"dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database,
257
+		"username" => $toolserver_username,
258
+		"password" => $toolserver_password,
259
+	),
260
+	"wikipedia"     => array(
261
+		"dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db,
262
+		"username" => $toolserver_username,
263
+		"password" => $toolserver_password,
264
+	),
265
+	"notifications" => array(
266
+		"dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database,
267
+		"username" => $notifications_username,
268
+		"password" => $notifications_password,
269
+	),
270 270
 );
271 271
 
272 272
 // //Keep the included files from being executed.
@@ -278,18 +278,18 @@  discard block
 block discarded – undo
278 278
 ini_set('user_agent', $toolUserAgent);
279 279
 
280 280
 foreach (array(
281
-    "mbstring", // unicode and stuff
282
-    "pdo",
283
-    "pdo_mysql", // new database module
284
-    "session",
285
-    "date",
286
-    "pcre", // core stuff
287
-    "curl", // mediawiki api access etc
288
-    "openssl", // token generation
281
+	"mbstring", // unicode and stuff
282
+	"pdo",
283
+	"pdo_mysql", // new database module
284
+	"session",
285
+	"date",
286
+	"pcre", // core stuff
287
+	"curl", // mediawiki api access etc
288
+	"openssl", // token generation
289 289
 ) as $x) {
290
-    if (!extension_loaded($x)) {
291
-        die("extension $x is required.");
292
-    }
290
+	if (!extension_loaded($x)) {
291
+		die("extension $x is required.");
292
+	}
293 293
 }
294 294
 
295 295
 // Set up the AutoLoader
@@ -316,32 +316,32 @@  discard block
 block discarded – undo
316 316
 $siteConfiguration = new \Waca\SiteConfiguration();
317 317
 
318 318
 $siteConfiguration->setBaseUrl($baseurl)
319
-    ->setFilePath(__DIR__)
320
-    ->setDebuggingTraceEnabled($enableErrorTrace)
321
-    ->setForceIdentification($forceIdentification)
322
-    ->setIdentificationCacheExpiry($identificationCacheExpiry)
323
-    ->setMediawikiScriptPath($mediawikiScriptPath)
324
-    ->setMediawikiWebServiceEndpoint($mediawikiWebServiceEndpoint)
325
-    ->setMetaWikimediaWebServiceEndpoint($metaWikimediaWebServiceEndpoint)
326
-    ->setEnforceOAuth($enforceOAuth)
327
-    ->setEmailConfirmationEnabled($enableEmailConfirm == 1)
328
-    ->setEmailConfirmationExpiryDays($emailConfirmationExpiryDays)
329
-    ->setMiserModeLimit($requestLimitShowOnly)
330
-    ->setRequestStates($availableRequestStates)
331
-    ->setSquidList($squidIpList)
332
-    ->setDefaultCreatedTemplateId($createdid)
333
-    ->setDefaultRequestStateKey($defaultRequestStateKey)
334
-    ->setUseStrictTransportSecurity($strictTransportSecurityExpiry)
335
-    ->setUserAgent($toolUserAgent)
336
-    ->setCurlDisableVerifyPeer($curlDisableSSLVerifyPeer)
337
-    ->setUseOAuthSignup($useOauthSignup)
338
-    ->setOAuthBaseUrl($oauthBaseUrl)
339
-    ->setOAuthConsumerToken($oauthConsumerToken)
340
-    ->setOAuthConsumerSecret($oauthSecretToken)
341
-    ->setDataClearInterval($dataclear_interval)
342
-    ->setXffTrustedHostsFile($xff_trusted_hosts_file)
343
-    ->setIrcNotificationsEnabled($ircBotNotificationsEnabled == 1)
344
-    ->setIrcNotificationType($ircBotNotificationType)
345
-    ->setIrcNotificationsInstance($whichami)
346
-    ->setTitleBlacklistEnabled($enableTitleblacklist == 1)
347
-    ->setTorExitPaths(array_merge(gethostbynamel('en.wikipedia.org'), gethostbynamel('accounts.wmflabs.org')));
319
+	->setFilePath(__DIR__)
320
+	->setDebuggingTraceEnabled($enableErrorTrace)
321
+	->setForceIdentification($forceIdentification)
322
+	->setIdentificationCacheExpiry($identificationCacheExpiry)
323
+	->setMediawikiScriptPath($mediawikiScriptPath)
324
+	->setMediawikiWebServiceEndpoint($mediawikiWebServiceEndpoint)
325
+	->setMetaWikimediaWebServiceEndpoint($metaWikimediaWebServiceEndpoint)
326
+	->setEnforceOAuth($enforceOAuth)
327
+	->setEmailConfirmationEnabled($enableEmailConfirm == 1)
328
+	->setEmailConfirmationExpiryDays($emailConfirmationExpiryDays)
329
+	->setMiserModeLimit($requestLimitShowOnly)
330
+	->setRequestStates($availableRequestStates)
331
+	->setSquidList($squidIpList)
332
+	->setDefaultCreatedTemplateId($createdid)
333
+	->setDefaultRequestStateKey($defaultRequestStateKey)
334
+	->setUseStrictTransportSecurity($strictTransportSecurityExpiry)
335
+	->setUserAgent($toolUserAgent)
336
+	->setCurlDisableVerifyPeer($curlDisableSSLVerifyPeer)
337
+	->setUseOAuthSignup($useOauthSignup)
338
+	->setOAuthBaseUrl($oauthBaseUrl)
339
+	->setOAuthConsumerToken($oauthConsumerToken)
340
+	->setOAuthConsumerSecret($oauthSecretToken)
341
+	->setDataClearInterval($dataclear_interval)
342
+	->setXffTrustedHostsFile($xff_trusted_hosts_file)
343
+	->setIrcNotificationsEnabled($ircBotNotificationsEnabled == 1)
344
+	->setIrcNotificationType($ircBotNotificationType)
345
+	->setIrcNotificationsInstance($whichami)
346
+	->setTitleBlacklistEnabled($enableTitleblacklist == 1)
347
+	->setTorExitPaths(array_merge(gethostbynamel('en.wikipedia.org'), gethostbynamel('accounts.wmflabs.org')));
Please login to merge, or discard this patch.