Failed Conditions
Pull Request — oauthcreation (#531)
by Simon
18:38 queued 08:37
created
config.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
 $BUbasefile = "backup"; // The basefile's name.
132 132
 $BUdir = "/home/project/a/c/c/acc/backups"; // The directory where backups should be stored.
133
-$BUmonthdir = $BUdir . "/monthly"; // The directory where monthly backups should be stored.
133
+$BUmonthdir = $BUdir."/monthly"; // The directory where monthly backups should be stored.
134 134
 $BUdumper = "/opt/ts/mysql/5.1/bin/mysqldump --defaults-file=~/.my.cnf p_acc_live"; // Add parameters here if they are needed.
135 135
 $BUgzip = "/usr/bin/gzip"; // Add the gzip parameters here if needed.
136 136
 $BUtar = "/bin/tar -cvf"; // Add the tar parameters here if needed.
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 $curlDisableSSLVerifyPeer = false;
247 247
 
248 248
 // Change this to be outside the web directory.
249
-$curlCookieJar = __DIR__ . '/../cookies.txt';
249
+$curlCookieJar = __DIR__.'/../cookies.txt';
250 250
 
251 251
 $yubicoApiId = 0;
252 252
 $yubicoApiKey = "";
@@ -265,17 +265,17 @@  discard block
 block discarded – undo
265 265
 
266 266
 $cDatabaseConfig = array(
267 267
     "acc"           => array(
268
-        "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database,
268
+        "dsrcname" => "mysql:host=".$toolserver_host.";dbname=".$toolserver_database,
269 269
         "username" => $toolserver_username,
270 270
         "password" => $toolserver_password,
271 271
     ),
272 272
     "wikipedia"     => array(
273
-        "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db,
273
+        "dsrcname" => "mysql:host=".$antispoof_host.";dbname=".$antispoof_db,
274 274
         "username" => $toolserver_username,
275 275
         "password" => $toolserver_password,
276 276
     ),
277 277
     "notifications" => array(
278
-        "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database,
278
+        "dsrcname" => "mysql:host=".$toolserver_notification_dbhost.";dbname=".$toolserver_notification_database,
279 279
         "username" => $notifications_username,
280 280
         "password" => $notifications_password,
281 281
     ),
@@ -305,13 +305,13 @@  discard block
 block discarded – undo
305 305
 }
306 306
 
307 307
 // Set up the AutoLoader
308
-require_once(__DIR__ . "/includes/AutoLoader.php");
308
+require_once(__DIR__."/includes/AutoLoader.php");
309 309
 spl_autoload_register('Waca\\AutoLoader::load');
310
-require_once(__DIR__ . '/vendor/autoload.php');
310
+require_once(__DIR__.'/vendor/autoload.php');
311 311
 
312 312
 // Extra includes which are just plain awkward wherever they are.
313
-require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/OAuth.php');
314
-require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/JWT.php');
313
+require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/OAuth.php');
314
+require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/JWT.php');
315 315
 
316 316
 // Crap that's needed for libraries. >:(
317 317
 /**
Please login to merge, or discard this patch.
includes/Pages/UserAuth/Login/LoginCredentialPageBase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             }
135 135
             else {
136 136
                 // This is the login form, not the request form. We need protection here.
137
-                $this->redirectUrl('https://' . WebRequest::serverName() . WebRequest::requestUri());
137
+                $this->redirectUrl('https://'.WebRequest::serverName().WebRequest::requestUri());
138 138
 
139 139
                 return false;
140 140
             }
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             throw new ApplicationLogicException('Unknown page handler for next authentication stage.');
279 279
         }
280 280
 
281
-        $this->redirect("login/" . $this->nextPageMap[$nextStage]);
281
+        $this->redirect("login/".$this->nextPageMap[$nextStage]);
282 282
     }
283 283
 
284 284
     private function setupAlternates(User $user, $partialStage, PdoDatabase $database)
Please login to merge, or discard this patch.
includes/Pages/UserAuth/Login/PagePasswordLogin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@
 block discarded – undo
17 17
     {
18 18
         list($partialId, $partialStage) = WebRequest::getAuthPartialLogin();
19 19
 
20
-        if($partialId !== null && $partialStage > 1) {
20
+        if ($partialId !== null && $partialStage > 1) {
21 21
             $sql = 'SELECT type FROM credential WHERE user = :user AND factor = :stage AND disabled = 0 ORDER BY priority';
22 22
             $statement = $this->getDatabase()->prepare($sql);
23 23
             $statement->execute(array(':user' => $partialId, ':stage' => $partialStage));
24 24
             $nextStage = $statement->fetchColumn();
25 25
             $statement->closeCursor();
26 26
 
27
-            $this->redirect("login/" . $this->nextPageMap[$nextStage]);
27
+            $this->redirect("login/".$this->nextPageMap[$nextStage]);
28 28
             return;
29 29
         }
30 30
 
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/YubikeyOtpCredentialProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
 
137 137
         $data = array();
138 138
         foreach ($apiResponse as $key => $value) {
139
-            $data[] = $key . "=" . $value;
139
+            $data[] = $key."=".$value;
140 140
         }
141 141
         $dataString = implode('&', $data);
142 142
 
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/U2FCredentialProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     {
33 33
         parent::__construct($database, $configuration, 'u2f');
34 34
 
35
-        $appId = 'https://' . WebRequest::httpHost();
35
+        $appId = 'https://'.WebRequest::httpHost();
36 36
         $this->u2f = new U2F($appId);
37 37
     }
38 38
 
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/CredentialProviderBase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             ':t' => $this->type
56 56
         );
57 57
 
58
-        if($disabled !== null) {
58
+        if ($disabled !== null) {
59 59
             $sql .= ' AND disabled = :d';
60 60
             $parameters[':d'] = $disabled ? 1 : 0;
61 61
         }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $alternates = $statement->fetchColumn();
110 110
         $statement->closeCursor();
111 111
 
112
-        if($alternates <= 1) {
112
+        if ($alternates <= 1) {
113 113
             // decrement the factor for every stage above this
114 114
             $sql = 'UPDATE credential SET factor = factor - 1 WHERE user = :user AND factor > :factor';
115 115
             $statement = $this->database->prepare($sql);
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/TotpCredentialProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      */
92 92
     public function setCredential(User $user, $factor, $data)
93 93
     {
94
-        $issuer = 'ACC - ' . $this->getConfiguration()->getIrcNotificationsInstance();
94
+        $issuer = 'ACC - '.$this->getConfiguration()->getIrcNotificationsInstance();
95 95
         $totp = new TOTP($user->getUsername());
96 96
         $totp->setIssuer($issuer);
97 97
 
Please login to merge, or discard this patch.
includes/Security/EncryptionHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $password = $this->getEncryptionKey();
34 34
         $encryptedKey = openssl_encrypt($secret, 'aes-256-ctr', $password, OPENSSL_RAW_DATA, $iv);
35 35
 
36
-        $data = base64_encode($iv) . '|' . base64_encode($encryptedKey);
36
+        $data = base64_encode($iv).'|'.base64_encode($encryptedKey);
37 37
 
38 38
         return $data;
39 39
     }
Please login to merge, or discard this patch.
smarty-plugins/modifier.nlimplode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 {
17 17
     $last = array_pop($list);
18 18
     if ($list) {
19
-        return implode(', ', $list) . ', ' . $conjunction . ' ' . $last;
19
+        return implode(', ', $list).', '.$conjunction.' '.$last;
20 20
     }
21 21
     return $last;
22 22
 }
23 23
\ No newline at end of file
Please login to merge, or discard this patch.