@@ -45,7 +45,7 @@ |
||
45 | 45 | $request = WebRequest::postString("request"); |
46 | 46 | |
47 | 47 | if ($authenticate === null || $authenticate === "" || $request === null || $request === "") { |
48 | - throw new ApplicationLogicException("No authentication specified"); |
|
48 | + throw new ApplicationLogicException("No authentication specified"); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return array(json_decode($authenticate), json_decode($request), 'u2f'); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $userSearchHelper = UserSearchHelper::get($this->getDatabase()); |
24 | 24 | |
25 | 25 | if (WebRequest::getString('all') === null) { |
26 | - $userSearchHelper->byStatus(User::STATUS_ACTIVE); |
|
26 | + $userSearchHelper->byStatus(User::STATUS_ACTIVE); |
|
27 | 27 | |
28 | 28 | } |
29 | 29 |
@@ -241,19 +241,19 @@ |
||
241 | 241 | */ |
242 | 242 | public function setForwardedIp($forwardedip) |
243 | 243 | { |
244 | - // Verify that the XFF chain only contains valid IP addresses, and silently discard anything that isn't. |
|
244 | + // Verify that the XFF chain only contains valid IP addresses, and silently discard anything that isn't. |
|
245 | 245 | |
246 | - $xff = explode(',', $forwardedip); |
|
247 | - $valid = array(); |
|
246 | + $xff = explode(',', $forwardedip); |
|
247 | + $valid = array(); |
|
248 | 248 | |
249 | - foreach ($xff as $ip) { |
|
250 | - $ip = trim($ip); |
|
251 | - if (filter_var($ip, FILTER_VALIDATE_IP)) { |
|
252 | - $valid[] = $ip; |
|
253 | - } |
|
254 | - } |
|
249 | + foreach ($xff as $ip) { |
|
250 | + $ip = trim($ip); |
|
251 | + if (filter_var($ip, FILTER_VALIDATE_IP)) { |
|
252 | + $valid[] = $ip; |
|
253 | + } |
|
254 | + } |
|
255 | 255 | |
256 | - $this->forwardedip = implode(", ", $valid); |
|
256 | + $this->forwardedip = implode(", ", $valid); |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | /** |
@@ -420,7 +420,7 @@ |
||
420 | 420 | . '|' . $this->forwardedip // } private data not known to those without access |
421 | 421 | . '|' . $this->useragent // } |
422 | 422 | . '|' . $this->email // } |
423 | - . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
423 | + . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
424 | 424 | |
425 | 425 | return hash('sha256', $data); |
426 | 426 | } |
@@ -28,15 +28,15 @@ |
||
28 | 28 | return (bool)$dontUseDb; |
29 | 29 | } |
30 | 30 | |
31 | - /** |
|
32 | - * Gets the offline message |
|
33 | - * |
|
34 | - * @param bool $external |
|
35 | - * @param null|string $message |
|
36 | - * |
|
37 | - * @return string |
|
38 | - * @throws SmartyException |
|
39 | - */ |
|
31 | + /** |
|
32 | + * Gets the offline message |
|
33 | + * |
|
34 | + * @param bool $external |
|
35 | + * @param null|string $message |
|
36 | + * |
|
37 | + * @return string |
|
38 | + * @throws SmartyException |
|
39 | + */ |
|
40 | 40 | public static function getOfflineMessage($external, $message = null) |
41 | 41 | { |
42 | 42 | global $dontUseDbCulprit, $dontUseDbReason, $baseurl; |
@@ -190,7 +190,8 @@ |
||
190 | 190 | $endpoint = $this->siteConfiguration->getMetaWikimediaWebServiceEndpoint(); |
191 | 191 | $response = $this->httpHelper->get($endpoint, $parameters); |
192 | 192 | $response = json_decode($response, true); |
193 | - } catch (CurlException $ex) { |
|
193 | + } |
|
194 | + catch (CurlException $ex) { |
|
194 | 195 | // failed getting identification status, so throw a nicer error. |
195 | 196 | $message = 'Could not contact metawiki API to determine user\' identification status. ' |
196 | 197 | . 'This is probably a transient error, so please try again.'; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $currentUser = User::getCurrent($database); |
49 | 49 | $this->assign('currentUser', $currentUser); |
50 | 50 | |
51 | - if($this->securityManager !== null) { |
|
51 | + if ($this->securityManager !== null) { |
|
52 | 52 | $this->setupNavMenuAccess($currentUser); |
53 | 53 | } |
54 | 54 |
@@ -16,8 +16,8 @@ |
||
16 | 16 | 'google' => 'https://www.google.com/search?q=%DATA%', |
17 | 17 | 'domain' => 'http://%DATA%/', |
18 | 18 | 'rangefinder' => 'https://tools.wmflabs.org/rangeblockfinder/?ip=%DATA%', |
19 | - 'ipcheck' => 'https://ipcheck.toolforge.org/index.php?ip=%DATA%', |
|
20 | - 'bgpview' => 'https://bgpview.io/ip/%DATA%' |
|
19 | + 'ipcheck' => 'https://ipcheck.toolforge.org/index.php?ip=%DATA%', |
|
20 | + 'bgpview' => 'https://bgpview.io/ip/%DATA%' |
|
21 | 21 | ); |
22 | 22 | |
23 | 23 | if (!isset($_GET['tool']) |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $currentUser = User::getCurrent($database); |
49 | 49 | $this->assign('currentUser', $currentUser); |
50 | 50 | |
51 | - if($this->securityManager !== null) { |
|
51 | + if ($this->securityManager !== null) { |
|
52 | 52 | $this->setupNavMenuAccess($currentUser); |
53 | 53 | } |
54 | 54 |
@@ -592,7 +592,7 @@ |
||
592 | 592 | { |
593 | 593 | $cookie = &self::$globalStateProvider->getCookieSuperGlobal(); |
594 | 594 | |
595 | - if(isset($cookie['sitenotice'])) { |
|
595 | + if (isset($cookie['sitenotice'])) { |
|
596 | 596 | return $cookie['sitenotice'] === $expectedHash; |
597 | 597 | } |
598 | 598 |