Passed
Push — release_2_0 ( 645eff...15c6ac )
by Maja
05:52
created
config/config-master-template.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
      * @var array
157 157
      */
158
-    'MAILSETTINGS' => [ // we always use Submission
158
+    'MAILSETTINGS' => [// we always use Submission
159 159
         'host' => 'submission.capable.mta',
160 160
         'user'=> 'mailuser',
161 161
         'pass' => 'mailpass',
@@ -172,25 +172,25 @@  discard block
 block discarded – undo
172 172
      * @var array
173 173
      */
174 174
     'LANGUAGES' => [
175
-      'bg' => ['display' => 'Български',   'locale' => 'bg_BG.utf8',    'latin_based' => FALSE],
176
-      'ca' => ['display' => 'Català',      'locale' => 'ca_ES.utf8',    'latin_based' => TRUE],
177
-      'cs' => ['display' => 'Čeština',     'locale' => 'cs_CZ.utf8',    'latin_based' => TRUE],
178
-      'de' => ['display' => 'Deutsch',     'locale' => 'de_DE.utf8',    'latin_based' => TRUE],
179
-      'el' => ['display' => 'Ελληνικά',    'locale' => 'el_GR.utf8',    'latin_based' => FALSE],
180
-      'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8',    'latin_based' => TRUE],
181
-      'es' => ['display' => 'Español',     'locale' => 'es_ES.utf8',    'latin_based' => TRUE],     
182
-      'et' => ['display' => 'Eesti',       'locale' => 'et_EE.utf8',    'latin_based' => TRUE], 
183
-      'fr' => ['display' => 'Français',    'locale' => 'fr_FR.utf8',    'latin_based' => TRUE],
184
-      'hr' => ['display' => 'Hrvatski',    'locale' => 'hr_HR.utf8',    'latin_based' => TRUE],
185
-      'hu' => ['display' => 'Magyar',      'locale' => 'hu_HU.utf8',    'latin_based' => TRUE],
186
-      'it' => ['display' => 'Italiano',    'locale' => 'it_IT.utf8',    'latin_based' => TRUE],
187
-      'nb' => ['display' => 'Norsk',       'locale' => 'nb_NO.utf8',    'latin_based' => TRUE],
188
-      'pl' => ['display' => 'Polski',      'locale' => 'pl_PL.utf8',    'latin_based' => TRUE],
189
-      'pt' => ['display' => 'Português',   'locale' => 'pt_PT.utf8',    'latin_based' => TRUE],
190
-      'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8',    'latin_based' => TRUE],
191
-      'sr' => ['display' => 'Srpski',      'locale' => 'sr_RS@latin',   'latin_based' => TRUE],
192
-      'fi' => ['display' => 'Suomi',       'locale' => 'fi_FI.utf8',    'latin_based' => TRUE],
193
-      'tr' => ['display' => 'Türkçe',      'locale' => 'tr_TR.utf8',    'latin_based' => TRUE],
175
+      'bg' => ['display' => 'Български', 'locale' => 'bg_BG.utf8', 'latin_based' => FALSE],
176
+      'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE],
177
+      'cs' => ['display' => 'Čeština', 'locale' => 'cs_CZ.utf8', 'latin_based' => TRUE],
178
+      'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE],
179
+      'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE],
180
+      'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE],
181
+      'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8', 'latin_based' => TRUE],     
182
+      'et' => ['display' => 'Eesti', 'locale' => 'et_EE.utf8', 'latin_based' => TRUE], 
183
+      'fr' => ['display' => 'Français', 'locale' => 'fr_FR.utf8', 'latin_based' => TRUE],
184
+      'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8', 'latin_based' => TRUE],
185
+      'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8', 'latin_based' => TRUE],
186
+      'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8', 'latin_based' => TRUE],
187
+      'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8', 'latin_based' => TRUE],
188
+      'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8', 'latin_based' => TRUE],
189
+      'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8', 'latin_based' => TRUE],
190
+      'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8', 'latin_based' => TRUE],
191
+      'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin', 'latin_based' => TRUE],
192
+      'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8', 'latin_based' => TRUE],
193
+      'tr' => ['display' => 'Türkçe', 'locale' => 'tr_TR.utf8', 'latin_based' => TRUE],
194 194
 
195 195
 
196 196
 
Please login to merge, or discard this patch.
Indentation   +27 added lines, -28 removed lines patch added patch discarded remove patch
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
     ],
119 119
 
120 120
     /**
121
-      * Configuration for GeoIP2 
122
-      * Beware, the legacy version does not really work with IPv6 addresses
123
-      * version: set to 2 if you wish to use GeoIP2, to 1 for the legacy version or set to 0 to turn off geolocation service
124
-      * geoip2-path-to-autoloader: points to the GeoIP2 autoloader 
125
-      * geoip2-path-to-db: points to the GeoIP2 city database
126
-      * @var array
127
-      */
121
+     * Configuration for GeoIP2 
122
+     * Beware, the legacy version does not really work with IPv6 addresses
123
+     * version: set to 2 if you wish to use GeoIP2, to 1 for the legacy version or set to 0 to turn off geolocation service
124
+     * geoip2-path-to-autoloader: points to the GeoIP2 autoloader 
125
+     * geoip2-path-to-db: points to the GeoIP2 city database
126
+     * @var array
127
+     */
128 128
       
129 129
     'GEOIP' => [
130 130
         'version' => 0,
@@ -152,7 +152,6 @@  discard block
 block discarded – undo
152 152
      *    mails, just configure the signing cert with these parameters. All must
153 153
      *    be non-NULL for signing to happen. If you don't need a keypass, make 
154 154
      *    it an empty string instead.
155
-
156 155
      * @var array
157 156
      */
158 157
     'MAILSETTINGS' => [ // we always use Submission
@@ -172,25 +171,25 @@  discard block
 block discarded – undo
172 171
      * @var array
173 172
      */
174 173
     'LANGUAGES' => [
175
-      'bg' => ['display' => 'Български',   'locale' => 'bg_BG.utf8',    'latin_based' => FALSE],
176
-      'ca' => ['display' => 'Català',      'locale' => 'ca_ES.utf8',    'latin_based' => TRUE],
177
-      'cs' => ['display' => 'Čeština',     'locale' => 'cs_CZ.utf8',    'latin_based' => TRUE],
178
-      'de' => ['display' => 'Deutsch',     'locale' => 'de_DE.utf8',    'latin_based' => TRUE],
179
-      'el' => ['display' => 'Ελληνικά',    'locale' => 'el_GR.utf8',    'latin_based' => FALSE],
180
-      'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8',    'latin_based' => TRUE],
181
-      'es' => ['display' => 'Español',     'locale' => 'es_ES.utf8',    'latin_based' => TRUE],     
182
-      'et' => ['display' => 'Eesti',       'locale' => 'et_EE.utf8',    'latin_based' => TRUE], 
183
-      'fr' => ['display' => 'Français',    'locale' => 'fr_FR.utf8',    'latin_based' => TRUE],
184
-      'hr' => ['display' => 'Hrvatski',    'locale' => 'hr_HR.utf8',    'latin_based' => TRUE],
185
-      'hu' => ['display' => 'Magyar',      'locale' => 'hu_HU.utf8',    'latin_based' => TRUE],
186
-      'it' => ['display' => 'Italiano',    'locale' => 'it_IT.utf8',    'latin_based' => TRUE],
187
-      'nb' => ['display' => 'Norsk',       'locale' => 'nb_NO.utf8',    'latin_based' => TRUE],
188
-      'pl' => ['display' => 'Polski',      'locale' => 'pl_PL.utf8',    'latin_based' => TRUE],
189
-      'pt' => ['display' => 'Português',   'locale' => 'pt_PT.utf8',    'latin_based' => TRUE],
190
-      'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8',    'latin_based' => TRUE],
191
-      'sr' => ['display' => 'Srpski',      'locale' => 'sr_RS@latin',   'latin_based' => TRUE],
192
-      'fi' => ['display' => 'Suomi',       'locale' => 'fi_FI.utf8',    'latin_based' => TRUE],
193
-      'tr' => ['display' => 'Türkçe',      'locale' => 'tr_TR.utf8',    'latin_based' => TRUE],
174
+        'bg' => ['display' => 'Български',   'locale' => 'bg_BG.utf8',    'latin_based' => FALSE],
175
+        'ca' => ['display' => 'Català',      'locale' => 'ca_ES.utf8',    'latin_based' => TRUE],
176
+        'cs' => ['display' => 'Čeština',     'locale' => 'cs_CZ.utf8',    'latin_based' => TRUE],
177
+        'de' => ['display' => 'Deutsch',     'locale' => 'de_DE.utf8',    'latin_based' => TRUE],
178
+        'el' => ['display' => 'Ελληνικά',    'locale' => 'el_GR.utf8',    'latin_based' => FALSE],
179
+        'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8',    'latin_based' => TRUE],
180
+        'es' => ['display' => 'Español',     'locale' => 'es_ES.utf8',    'latin_based' => TRUE],     
181
+        'et' => ['display' => 'Eesti',       'locale' => 'et_EE.utf8',    'latin_based' => TRUE], 
182
+        'fr' => ['display' => 'Français',    'locale' => 'fr_FR.utf8',    'latin_based' => TRUE],
183
+        'hr' => ['display' => 'Hrvatski',    'locale' => 'hr_HR.utf8',    'latin_based' => TRUE],
184
+        'hu' => ['display' => 'Magyar',      'locale' => 'hu_HU.utf8',    'latin_based' => TRUE],
185
+        'it' => ['display' => 'Italiano',    'locale' => 'it_IT.utf8',    'latin_based' => TRUE],
186
+        'nb' => ['display' => 'Norsk',       'locale' => 'nb_NO.utf8',    'latin_based' => TRUE],
187
+        'pl' => ['display' => 'Polski',      'locale' => 'pl_PL.utf8',    'latin_based' => TRUE],
188
+        'pt' => ['display' => 'Português',   'locale' => 'pt_PT.utf8',    'latin_based' => TRUE],
189
+        'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8',    'latin_based' => TRUE],
190
+        'sr' => ['display' => 'Srpski',      'locale' => 'sr_RS@latin',   'latin_based' => TRUE],
191
+        'fi' => ['display' => 'Suomi',       'locale' => 'fi_FI.utf8',    'latin_based' => TRUE],
192
+        'tr' => ['display' => 'Türkçe',      'locale' => 'tr_TR.utf8',    'latin_based' => TRUE],
194 193
 
195 194
 
196 195
 
@@ -267,7 +266,7 @@  discard block
 block discarded – undo
267 266
             'user' => 'customerservice',
268 267
             'pass' => '2lame4u',
269 268
             'readonly' => TRUE, ],
270
-         'enforce-external-sync' => TRUE,
269
+            'enforce-external-sync' => TRUE,
271 270
     ],
272 271
 
273 272
     /**
Please login to merge, or discard this patch.
config/autoloader.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once __DIR__ . "/../core/Psr4Autoloader.php";
22
+require_once __DIR__."/../core/Psr4Autoloader.php";
23 23
 use core\autoloader\Psr4Autoloader;
24 24
 
25 25
 // instantiate the loader
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 
31 31
 // register the base directories for the namespace prefix
32 32
 // include CAT/core library
33
-$loader->addNamespace('core', __DIR__ . "/../core");
33
+$loader->addNamespace('core', __DIR__."/../core");
34 34
 // include CAT/devices library
35
-$loader->addNamespace('devices', __DIR__ . "/../devices");
35
+$loader->addNamespace('devices', __DIR__."/../devices");
36 36
 // include CAT/web library
37
-$loader->addNamespace('web', __DIR__ . "/../web");
37
+$loader->addNamespace('web', __DIR__."/../web");
38 38
 
39 39
 // include PHPMailer library
40
-$loader->addNamespace('PHPMailer\PHPMailer', __DIR__ . "/../core/PHPMailer/src");
40
+$loader->addNamespace('PHPMailer\PHPMailer', __DIR__."/../core/PHPMailer/src");
Please login to merge, or discard this patch.
config/_config.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  */
21 21
 
22 22
 require_once "autoloader.php";
23
-require_once __DIR__ . "/../packageRoot.php";
23
+require_once __DIR__."/../packageRoot.php";
24 24
 
25 25
 /* This code block compares the template config against the actual one to find
26 26
  * out which of the values are MISSING, which are still at DEFAULT and which
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
  */
89 89
 // this is the actual config
90 90
 
91
-if (!file_exists(ROOT . "/config/config-master.php")) {
91
+if (!file_exists(ROOT."/config/config-master.php")) {
92 92
     echo "Master configuration file not found. You need to configure the product! At least config-master.php is required!";
93 93
     throw new Exception("Master config file not found!");
94 94
 }
95 95
 
96
-require ROOT . "/config/config-master.php";
96
+require ROOT."/config/config-master.php";
97 97
 
98 98
 /* as a test for the config comparison, run this, display in browser and exit 
99 99
 
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
 /* load sub-configs if we are dealing with those in this installation */
110 110
 
111 111
 if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == 'LOCAL' || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == 'LOCAL') {
112
-    include ROOT . "/config/config-confassistant.php";
112
+    include ROOT."/config/config-confassistant.php";
113 113
 } else { // we want to define the constant itself anyway, to avoid some ugly warnings on the console
114 114
     // this is done with an inline include
115 115
     define("CONFIG_CONFASSISTANT", []);
116 116
 }
117 117
 
118 118
 if (CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] == 'LOCAL') {
119
-    include ROOT . "/config/config-diagnostics.php";
119
+    include ROOT."/config/config-diagnostics.php";
120 120
 } else { // same here
121 121
     define("CONFIG_DIAGNOSTICS", []);
122 122
 }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 function CAT_session_start() {
130 130
     if (session_status() != PHP_SESSION_ACTIVE) {
131 131
         session_name("CAT");
132
-        session_set_cookie_params(0, "/", $_SERVER['SERVER_NAME'], (isset($_SERVER['HTTPS']) ? TRUE : FALSE ));
132
+        session_set_cookie_params(0, "/", $_SERVER['SERVER_NAME'], (isset($_SERVER['HTTPS']) ? TRUE : FALSE));
133 133
         session_start();
134 134
     }
135 135
 }
Please login to merge, or discard this patch.
core/CAT.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 namespace core;
34 34
 
35
-require_once dirname(__DIR__) . "/config/_config.php";
35
+require_once dirname(__DIR__)."/config/_config.php";
36 36
 
37 37
 CAT_session_start();
38 38
 
@@ -107,17 +107,17 @@  discard block
 block discarded – undo
107 107
         
108 108
         $this->CAT_VERSION_STRING = _("Unreleased <a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>Git Revision</a>");
109 109
         if (CAT::RELEASE_VERSION) {
110
-            $temp_version = "CAT-" . CAT::VERSION_MAJOR . "." . CAT::VERSION_MINOR;
111
-            $branch = "release_" . CAT::VERSION_MAJOR . "_" . CAT::VERSION_MINOR;
110
+            $temp_version = "CAT-".CAT::VERSION_MAJOR.".".CAT::VERSION_MINOR;
111
+            $branch = "release_".CAT::VERSION_MAJOR."_".CAT::VERSION_MINOR;
112 112
             if (CAT::VERSION_PATCH != 0) {
113
-                $temp_version .= "." . CAT::VERSION_PATCH;
113
+                $temp_version .= ".".CAT::VERSION_PATCH;
114 114
             }
115 115
             if (CAT::VERSION_EXTRA != "") {
116
-                $temp_version .= "-" . CAT::VERSION_EXTRA;
116
+                $temp_version .= "-".CAT::VERSION_EXTRA;
117 117
             }
118
-            $this->CAT_VERSION_STRING = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/" . $branch . "/Changes.md", $temp_version);
118
+            $this->CAT_VERSION_STRING = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/".$branch."/Changes.md", $temp_version);
119 119
         }
120
-        $this->CAT_COPYRIGHT = CONFIG['APPEARANCE']['productname'] . " - " . $this->CAT_VERSION_STRING . " &copy; " . CAT::COPYRIGHT_MIN_YEAR . "-" . CAT::COPYRIGHT_MAX_YEAR . " " . CAT::COPYRIGHT_HOLDER . "<br/>on behalf of " . CAT::COPYRIGHT_CONSORTIA . "; and others <a href='copyright.php'>Full Copyright and Licenses</a>";
120
+        $this->CAT_COPYRIGHT = CONFIG['APPEARANCE']['productname']." - ".$this->CAT_VERSION_STRING." &copy; ".CAT::COPYRIGHT_MIN_YEAR."-".CAT::COPYRIGHT_MAX_YEAR." ".CAT::COPYRIGHT_HOLDER."<br/>on behalf of ".CAT::COPYRIGHT_CONSORTIA."; and others <a href='copyright.php'>Full Copyright and Licenses</a>";
121 121
         
122 122
 
123 123
         /* Federations are created in DB with bootstrapFederation, and listed via listFederations
Please login to merge, or discard this patch.
core/User.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
         common\Entity::intoThePotatoes();
155 155
         $mail = \core\common\OutsideComm::mailHandle();
156 156
 // who to whom?
157
-        $mail->FromName = CONFIG['APPEARANCE']['productname'] . " Notification System";
158
-        $mail->addReplyTo(CONFIG['APPEARANCE']['support-contact']['developer-mail'], CONFIG['APPEARANCE']['productname'] . " " . _("Feedback"));
157
+        $mail->FromName = CONFIG['APPEARANCE']['productname']." Notification System";
158
+        $mail->addReplyTo(CONFIG['APPEARANCE']['support-contact']['developer-mail'], CONFIG['APPEARANCE']['productname']." "._("Feedback"));
159 159
         $mail->addAddress($mailaddr[0]["value"]);
160 160
 // what do we want to say?
161 161
         $mail->Subject = $subject;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                 }
218 218
                 $lookFor .= "$name";
219 219
             }
220
-            $finding = preg_match("/^(" . $lookFor . "):(.*)/", $oneRow->user_id, $matches);
220
+            $finding = preg_match("/^(".$lookFor."):(.*)/", $oneRow->user_id, $matches);
221 221
             if ($finding === 0 || $finding === FALSE) {
222 222
                 return FALSE;
223 223
             }
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
                         $matchedProviders[] = $idp;
236 236
                         $name = $idp;
237 237
                         if ($skipCurl == 0) {
238
-                            $url = CONFIG_DIAGNOSTICS['eduGainResolver']['url'] . "?action=get_entity_name&type=idp&e_id=$idp&lang=$lang";
238
+                            $url = CONFIG_DIAGNOSTICS['eduGainResolver']['url']."?action=get_entity_name&type=idp&e_id=$idp&lang=$lang";
239 239
                             $ch = curl_init($url);
240 240
                             curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
241 241
                             curl_setopt($ch, CURLOPT_TIMEOUT, CONFIG_DIAGNOSTICS['eduGainResolver']['timeout']);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
                             }
248 248
                             curl_close($ch);
249 249
                         }
250
-                        $listOfProviders[] = User::PROVIDER_STRINGS[$providerStrings[0]] . " - IdP: " . $name;
250
+                        $listOfProviders[] = User::PROVIDER_STRINGS[$providerStrings[0]]." - IdP: ".$name;
251 251
                     }
252 252
                     break;
253 253
                 case $providerStrings[1]:
Please login to merge, or discard this patch.
core/EntityWithDBProperties.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      * @return array list of row id's of file-based attributes which weren't deleted
162 162
      */
163 163
     public function beginFlushAttributes($extracondition = "") {
164
-        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : "");
164
+        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : "");
165 165
         $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND option_name NOT LIKE '%_file' $extracondition");
166 166
         $this->updateFreshness();
167 167
         $execFlush = $this->databaseHandle->exec("SELECT row FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier $extracondition");
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      * @return void
181 181
      */
182 182
     public function commitFlushAttributes(array $tobedeleted) {
183
-        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : "");
183
+        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : "");
184 184
         foreach (array_keys($tobedeleted) as $row) {
185 185
             $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND row = $row");
186 186
             $this->updateFreshness();
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     public function addAttribute($attrName, $attrLang, $attrValue) {
208 208
         $relevantId = $this->getRelevantIdentifier();
209 209
         $identifierType = (is_int($relevantId) ? "i" : "s");
210
-        $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType . "sss", $relevantId, $attrName, $attrLang, $attrValue);
210
+        $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType."sss", $relevantId, $attrName, $attrLang, $attrValue);
211 211
         $this->updateFreshness();
212 212
     }
213 213
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         $handle = DBConnection::handle("INST");
262 262
         $blobQuery = $handle->exec("SELECT option_value from $table WHERE row = $row");
263 263
         // SELECT -> returns resource, not boolean
264
-        while ($returnedData =  mysqli_fetch_object(/** @scrutinizer ignore-type */ $blobQuery)) {
264
+        while ($returnedData = mysqli_fetch_object(/** @scrutinizer ignore-type */ $blobQuery)) {
265 265
             $blob = $returnedData->option_value;
266 266
         }
267 267
         if (!isset($blob)) {
Please login to merge, or discard this patch.
core/ProfileRADIUS.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
 
113 113
         $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes);
114 114
 
115
-        $this->loggerInstance->debug(5, "Device-Level Attributes: " . print_r($this->deviceLevelAttributes, true));
116
-        $this->loggerInstance->debug(5, "EAP-Level Attributes: " . print_r($this->eapLevelAttributes, true));
117
-        $this->loggerInstance->debug(5, "All low-Level Attributes: " . print_r($attributesLowLevel, true));
115
+        $this->loggerInstance->debug(5, "Device-Level Attributes: ".print_r($this->deviceLevelAttributes, true));
116
+        $this->loggerInstance->debug(5, "EAP-Level Attributes: ".print_r($this->eapLevelAttributes, true));
117
+        $this->loggerInstance->debug(5, "All low-Level Attributes: ".print_r($attributesLowLevel, true));
118 118
 
119 119
         // now fetch and merge profile-level attributes if not already set on deeper level
120 120
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             }
134 134
         }
135 135
 
136
-        $this->loggerInstance->debug(5, "Merged Attributes: " . print_r($attributesLowLevel, true));
136
+        $this->loggerInstance->debug(5, "Merged Attributes: ".print_r($attributesLowLevel, true));
137 137
 
138 138
         // now, fetch and merge IdP-wide attributes
139 139
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 "row" => $attributeQuery->row,
189 189
                 "flag" => $optinfo['flag'],
190 190
                 "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL),
191
-                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )];
191
+                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())];
192 192
         }
193 193
         return $temparray;
194 194
     }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      * @return void
290 290
      */
291 291
     public function setAnonymousIDSupport($shallwe) {
292
-        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier");
292
+        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier");
293 293
     }
294 294
 
295 295
     /** Toggle special username for realm checks
@@ -299,8 +299,8 @@  discard block
 block discarded – undo
299 299
      * @return void
300 300
      */
301 301
     public function setRealmCheckUser($shallwe, $localpart = NULL) {
302
-        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") .
303
-                ( $localpart !== NULL ? ", checkuser_value = '$localpart' " : "") .
302
+        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0").
303
+                ($localpart !== NULL ? ", checkuser_value = '$localpart' " : "").
304 304
                 " WHERE profile_id = $this->identifier");
305 305
     }
306 306
 
@@ -312,8 +312,8 @@  discard block
 block discarded – undo
312 312
      * @return void
313 313
      */
314 314
     public function setInputVerificationPreference($verify, $hint) {
315
-        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") .
316
-                ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") .
315
+        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0").
316
+                ", hint_userinput_suffix = ".($hint === true ? "1" : "0").
317 317
                 " WHERE profile_id = $this->identifier");
318 318
     }
319 319
 
Please login to merge, or discard this patch.
core/diag/RADIUSTests.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -370,9 +370,9 @@
 block discarded – undo
370 370
         // inspired by https://stackoverflow.com/questions/2390604/how-to-pass-variables-as-stdin-into-command-line-from-php
371 371
         $proc = CONFIG['PATHS']['openssl']." crl -inform der";
372 372
         $descriptorspec = [
373
-          0 => ["pipe", "r"],
374
-          1 => ["pipe", "w"],
375
-          2 => ["pipe", "w"],
373
+            0 => ["pipe", "r"],
374
+            1 => ["pipe", "w"],
375
+            2 => ["pipe", "w"],
376 376
         ];
377 377
         $process = proc_open($proc, $descriptorspec, $pipes);
378 378
         if (!is_resource($process)) {
Please login to merge, or discard this patch.
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 use \Exception;
36 36
 
37
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
37
+require_once dirname(dirname(__DIR__))."/config/_config.php";
38 38
 
39 39
 /**
40 40
  * Test suite to verify that an EAP setup is actually working as advertised in
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             }
166 166
         }
167 167
 
168
-        $this->loggerInstance->debug(4, "RADIUSTests is in opMode " . $this->opMode . ", parameters were: $realm, $outerUsernameForChecks, " . print_r($supportedEapTypes, true));
168
+        $this->loggerInstance->debug(4, "RADIUSTests is in opMode ".$this->opMode.", parameters were: $realm, $outerUsernameForChecks, ".print_r($supportedEapTypes, true));
169 169
         $this->loggerInstance->debug(4, print_r($expectedServerNames, true));
170 170
         $this->loggerInstance->debug(4, print_r($expectedCABundle, true));
171 171
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                 $returnarray[] = RADIUSTests::CERTPROB_WILDCARD_IN_NAME;
253 253
                 continue; // otherwise we'd ALSO complain that it's not a real hostname
254 254
             }
255
-            if ($onename != "" && filter_var("foo@" . idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) {
255
+            if ($onename != "" && filter_var("foo@".idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) {
256 256
                 $returnarray[] = RADIUSTests::CERTPROB_NOT_A_HOSTNAME;
257 257
             }
258 258
         }
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
         if (preg_match("/sha1/i", $intermediateCa['full_details']['signatureTypeSN'])) {
278 278
             $returnarray[] = RADIUSTests::CERTPROB_SHA1_SIGNATURE;
279 279
         }
280
-        $this->loggerInstance->debug(4, "CERT IS: " . print_r($intermediateCa, TRUE));
280
+        $this->loggerInstance->debug(4, "CERT IS: ".print_r($intermediateCa, TRUE));
281 281
         if ($intermediateCa['basicconstraints_set'] == 0) {
282 282
             $returnarray[] = RADIUSTests::CERTPROB_NO_BASICCONSTRAINTS;
283 283
         }
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     public function udpReachability($probeindex, $opnameCheck = TRUE, $frag = TRUE) {
325 325
         // for EAP-TLS to be a viable option, we need to pass a random client cert to make eapol_test happy
326 326
         // the following PEM data is one of the SENSE EAPLab client certs (not secret at all)
327
-        $clientcert = file_get_contents(dirname(__FILE__) . "/clientcert.p12");
327
+        $clientcert = file_get_contents(dirname(__FILE__)."/clientcert.p12");
328 328
         if ($clientcert === FALSE) {
329 329
             throw new Exception("A dummy client cert is part of the source distribution, but could not be loaded!");
330 330
         }
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         if ($this->opMode == self::RADIUS_TEST_OPERATION_MODE_THOROUGH) {
334 334
             return $this->udpLogin($probeindex, $this->supportedEapTypes[0]->getArrayRep(), $this->outerUsernameForChecks, 'eaplab', $opnameCheck, $frag, $clientcert);
335 335
         }
336
-        return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@" . $this->realm, 'eaplab', $opnameCheck, $frag, $clientcert);
336
+        return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@".$this->realm, 'eaplab', $opnameCheck, $frag, $clientcert);
337 337
     }
338 338
 
339 339
     /**
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
             return RADIUSTests::CERTPROB_NO_CDP_HTTP;
354 354
         }
355 355
         // first and second sub-match is the full URL... check it
356
-        $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1] . $crlUrl[2]));
356
+        $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1].$crlUrl[2]));
357 357
         if ($crlcontent === FALSE) {
358 358
             return RADIUSTests::CERTPROB_NO_CRL_AT_CDP_URL;
359 359
         }
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
         fclose($pipes[1]);
385 385
         fclose($pipes[2]);
386 386
         $retval = proc_close($process);
387
-        if ($retval != 0 || !preg_match("/BEGIN X509 CRL/",$pem)) {
387
+        if ($retval != 0 || !preg_match("/BEGIN X509 CRL/", $pem)) {
388 388
             // this was not a real CRL
389 389
             return RADIUSTests::CERTPROB_NO_CRL_AT_CDP_URL;
390 390
         }
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         $origLength = strlen($hex);
407 407
         for ($i = 1; $i < $origLength; $i++) {
408 408
             if ($i % 2 == 1 && $i != strlen($hex)) {
409
-                $spaced .= $hex[$i] . " ";
409
+                $spaced .= $hex[$i]." ";
410 410
             } else {
411 411
                 $spaced .= $hex[$i];
412 412
             }
@@ -489,19 +489,19 @@  discard block
 block discarded – undo
489 489
         $eapText = \core\common\EAP::eapDisplayName($eaptype);
490 490
         $config = '
491 491
 network={
492
-  ssid="' . CONFIG['APPEARANCE']['productname'] . ' testing"
492
+  ssid="' . CONFIG['APPEARANCE']['productname'].' testing"
493 493
   key_mgmt=WPA-EAP
494 494
   proto=WPA2
495 495
   pairwise=CCMP
496 496
   group=CCMP
497 497
   ';
498 498
 // phase 1
499
-        $config .= 'eap=' . $eapText['OUTER'] . "\n";
499
+        $config .= 'eap='.$eapText['OUTER']."\n";
500 500
         $logConfig = $config;
501 501
 // phase 2 if applicable; all inner methods have passwords
502 502
         if (isset($eapText['INNER']) && $eapText['INNER'] != "") {
503
-            $config .= '  phase2="auth=' . $eapText['INNER'] . "\"\n";
504
-            $logConfig .= '  phase2="auth=' . $eapText['INNER'] . "\"\n";
503
+            $config .= '  phase2="auth='.$eapText['INNER']."\"\n";
504
+            $logConfig .= '  phase2="auth='.$eapText['INNER']."\"\n";
505 505
         }
506 506
 // all methods set a password, except EAP-TLS
507 507
         if ($eaptype != \core\common\EAP::EAPTYPE_TLS) {
@@ -517,11 +517,11 @@  discard block
 block discarded – undo
517 517
         }
518 518
 
519 519
 // inner identity
520
-        $config .= '  identity="' . $inner . "\"\n";
521
-        $logConfig .= '  identity="' . $inner . "\"\n";
520
+        $config .= '  identity="'.$inner."\"\n";
521
+        $logConfig .= '  identity="'.$inner."\"\n";
522 522
 // outer identity, may be equal
523
-        $config .= '  anonymous_identity="' . $outer . "\"\n";
524
-        $logConfig .= '  anonymous_identity="' . $outer . "\"\n";
523
+        $config .= '  anonymous_identity="'.$outer."\"\n";
524
+        $logConfig .= '  anonymous_identity="'.$outer."\"\n";
525 525
 // done
526 526
         $config .= "}";
527 527
         $logConfig .= "}";
@@ -582,13 +582,13 @@  discard block
 block discarded – undo
582 582
      * @return string the command-line for eapol_test
583 583
      */
584 584
     private function eapolTestConfig($probeindex, $opName, $frag) {
585
-        $cmdline = CONFIG_DIAGNOSTICS['PATHS']['eapol_test'] .
586
-                " -a " . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['ip'] .
587
-                " -s " . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['secret'] .
588
-                " -o serverchain.pem" .
589
-                " -c ./udp_login_test.conf" .
590
-                " -M 22:44:66:CA:20:" . sprintf("%02d", $probeindex) . " " .
591
-                " -t " . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['timeout'] . " ";
585
+        $cmdline = CONFIG_DIAGNOSTICS['PATHS']['eapol_test'].
586
+                " -a ".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['ip'].
587
+                " -s ".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['secret'].
588
+                " -o serverchain.pem".
589
+                " -c ./udp_login_test.conf".
590
+                " -M 22:44:66:CA:20:".sprintf("%02d", $probeindex)." ".
591
+                " -t ".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['timeout']." ";
592 592
         if ($opName) {
593 593
             $cmdline .= '-N126:s:"1cat.eduroam.org" ';
594 594
         }
@@ -617,10 +617,10 @@  discard block
 block discarded – undo
617 617
      * @throws Exception
618 618
      */
619 619
     private function createCArepository($tmpDir, &$intermOdditiesCAT, $servercert, $eapIntermediates, $eapIntermediateCRLs) {
620
-        if (!mkdir($tmpDir . "/root-ca-allcerts/", 0700, true)) {
620
+        if (!mkdir($tmpDir."/root-ca-allcerts/", 0700, true)) {
621 621
             throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-allcerts/\n");
622 622
         }
623
-        if (!mkdir($tmpDir . "/root-ca-eaponly/", 0700, true)) {
623
+        if (!mkdir($tmpDir."/root-ca-eaponly/", 0700, true)) {
624 624
             throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-eaponly/\n");
625 625
         }
626 626
 // make a copy of the EAP-received chain and add the configured intermediates, if any
@@ -634,15 +634,15 @@  discard block
 block discarded – undo
634 634
             }
635 635
             if ($decoded['ca'] == 1) {
636 636
                 if ($decoded['root'] == 1) { // save CAT roots to the root directory
637
-                    file_put_contents($tmpDir . "/root-ca-eaponly/configuredroot" . count($catRoots) . ".pem", $decoded['pem']);
638
-                    file_put_contents($tmpDir . "/root-ca-allcerts/configuredroot" . count($catRoots) . ".pem", $decoded['pem']);
637
+                    file_put_contents($tmpDir."/root-ca-eaponly/configuredroot".count($catRoots).".pem", $decoded['pem']);
638
+                    file_put_contents($tmpDir."/root-ca-allcerts/configuredroot".count($catRoots).".pem", $decoded['pem']);
639 639
                     $catRoots[] = $decoded['pem'];
640 640
                 } else { // save the intermediates to allcerts directory
641
-                    file_put_contents($tmpDir . "/root-ca-allcerts/cat-intermediate" . count($catIntermediates) . ".pem", $decoded['pem']);
641
+                    file_put_contents($tmpDir."/root-ca-allcerts/cat-intermediate".count($catIntermediates).".pem", $decoded['pem']);
642 642
                     $intermOdditiesCAT = array_merge($intermOdditiesCAT, $this->propertyCheckIntermediate($decoded));
643 643
                     if (isset($decoded['CRL']) && isset($decoded['CRL'][0])) {
644 644
                         $this->loggerInstance->debug(4, "got an intermediate CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain");
645
-                        file_put_contents($tmpDir . "/root-ca-allcerts/crl_cat" . count($catIntermediates) . ".pem", $decoded['CRL'][0]);
645
+                        file_put_contents($tmpDir."/root-ca-allcerts/crl_cat".count($catIntermediates).".pem", $decoded['CRL'][0]);
646 646
                     }
647 647
                     $catIntermediates[] = $decoded['pem'];
648 648
                 }
@@ -651,26 +651,26 @@  discard block
 block discarded – undo
651 651
         // save all intermediate certificates and CRLs to separate files in 
652 652
         // both root-ca directories
653 653
         foreach ($eapIntermediates as $index => $onePem) {
654
-            file_put_contents($tmpDir . "/root-ca-eaponly/intermediate$index.pem", $onePem);
655
-            file_put_contents($tmpDir . "/root-ca-allcerts/intermediate$index.pem", $onePem);
654
+            file_put_contents($tmpDir."/root-ca-eaponly/intermediate$index.pem", $onePem);
655
+            file_put_contents($tmpDir."/root-ca-allcerts/intermediate$index.pem", $onePem);
656 656
         }
657 657
         foreach ($eapIntermediateCRLs as $index => $onePem) {
658
-            file_put_contents($tmpDir . "/root-ca-eaponly/intermediateCRL$index.pem", $onePem);
659
-            file_put_contents($tmpDir . "/root-ca-allcerts/intermediateCRL$index.pem", $onePem);
658
+            file_put_contents($tmpDir."/root-ca-eaponly/intermediateCRL$index.pem", $onePem);
659
+            file_put_contents($tmpDir."/root-ca-allcerts/intermediateCRL$index.pem", $onePem);
660 660
         }
661 661
 
662 662
         $checkstring = "";
663 663
         if (isset($servercert['CRL']) && isset($servercert['CRL'][0])) {
664 664
             $this->loggerInstance->debug(4, "got a server CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain");
665 665
             $checkstring = "-crl_check_all";
666
-            file_put_contents($tmpDir . "/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]);
667
-            file_put_contents($tmpDir . "/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]);
666
+            file_put_contents($tmpDir."/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]);
667
+            file_put_contents($tmpDir."/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]);
668 668
         }
669 669
 
670 670
 
671 671
 // now c_rehash the root CA directory ...
672
-        system(CONFIG_DIAGNOSTICS['PATHS']['c_rehash'] . " $tmpDir/root-ca-eaponly/ > /dev/null");
673
-        system(CONFIG_DIAGNOSTICS['PATHS']['c_rehash'] . " $tmpDir/root-ca-allcerts/ > /dev/null");
672
+        system(CONFIG_DIAGNOSTICS['PATHS']['c_rehash']." $tmpDir/root-ca-eaponly/ > /dev/null");
673
+        system(CONFIG_DIAGNOSTICS['PATHS']['c_rehash']." $tmpDir/root-ca-allcerts/ > /dev/null");
674 674
         return $checkstring;
675 675
     }
676 676
 
@@ -701,12 +701,12 @@  discard block
 block discarded – undo
701 701
 // the error log will complain if we run this test against an empty file of certs
702 702
 // so test if there's something PEMy in the file at all
703 703
         if (filesize("$tmpDir/serverchain.pem") > 10) {
704
-            exec(CONFIG['PATHS']['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly);
705
-            $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n");
706
-            $this->loggerInstance->debug(4, "Chain verify pass 1: " . print_r($verifyResultEaponly, TRUE) . "\n");
707
-            exec(CONFIG['PATHS']['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts);
708
-            $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n");
709
-            $this->loggerInstance->debug(4, "Chain verify pass 2: " . print_r($verifyResultAllcerts, TRUE) . "\n");
704
+            exec(CONFIG['PATHS']['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly);
705
+            $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n");
706
+            $this->loggerInstance->debug(4, "Chain verify pass 1: ".print_r($verifyResultEaponly, TRUE)."\n");
707
+            exec(CONFIG['PATHS']['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts);
708
+            $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n");
709
+            $this->loggerInstance->debug(4, "Chain verify pass 2: ".print_r($verifyResultAllcerts, TRUE)."\n");
710 710
         }
711 711
 
712 712
 
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
         // we are UNHAPPY if no names match!
773 773
         $happiness = "UNHAPPY";
774 774
         foreach ($this->expectedServerNames as $expectedName) {
775
-            $this->loggerInstance->debug(4, "Managing expectations for $expectedName: " . print_r($servercert['CN'], TRUE) . print_r($servercert['sAN_DNS'], TRUE));
775
+            $this->loggerInstance->debug(4, "Managing expectations for $expectedName: ".print_r($servercert['CN'], TRUE).print_r($servercert['sAN_DNS'], TRUE));
776 776
             if (array_search($expectedName, $servercert['CN']) !== FALSE && array_search($expectedName, $servercert['sAN_DNS']) !== FALSE) {
777 777
                 $this->loggerInstance->debug(4, "Totally happy!");
778 778
                 $happiness = "TOTALLY";
@@ -816,11 +816,11 @@  discard block
 block discarded – undo
816 816
         $theconfigs = $this->wpaSupplicantConfig($eaptype, $finalInner, $finalOuter, $password);
817 817
         // the config intentionally does not include CA checking. We do this
818 818
         // ourselves after getting the chain with -o.
819
-        file_put_contents($tmpDir . "/udp_login_test.conf", $theconfigs[0]);
819
+        file_put_contents($tmpDir."/udp_login_test.conf", $theconfigs[0]);
820 820
 
821 821
         $cmdline = $this->eapolTestConfig($probeindex, $opnameCheck, $frag);
822 822
         $this->loggerInstance->debug(4, "Shallow reachability check cmdline: $cmdline\n");
823
-        $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n" . $theconfigs[1] . "\n");
823
+        $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n".$theconfigs[1]."\n");
824 824
         $time_start = microtime(true);
825 825
         $pflow = [];
826 826
         exec($cmdline, $pflow);
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
         if ($packetflow[count($packetflow) - 1] == 3 && $this->checkLineparse($packetflow_orig, self::LINEPARSE_CHECK_REJECTIGNORE)) {
864 864
             array_pop($packetflow);
865 865
         }
866
-        $this->loggerInstance->debug(5, "Packetflow: " . print_r($packetflow, TRUE));
866
+        $this->loggerInstance->debug(5, "Packetflow: ".print_r($packetflow, TRUE));
867 867
         $packetcount = array_count_values($packetflow);
868 868
         $testresults['packetcount'] = $packetcount;
869 869
         $testresults['packetflow'] = $packetflow;
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
         $x509 = new \core\common\X509();
942 942
         $eapCertArray = [];
943 943
 // $eap_certarray holds all certs received in EAP conversation
944
-        $incomingData = file_get_contents($tmpDir . "/serverchain.pem");
944
+        $incomingData = file_get_contents($tmpDir."/serverchain.pem");
945 945
         if ($incomingData !== FALSE) {
946 946
             $eapCertArray = $x509->splitCertificate($incomingData);
947 947
         }
@@ -968,10 +968,10 @@  discard block
 block discarded – undo
968 968
                 case RADIUSTests::SERVER_CA_SELFSIGNED:
969 969
                     $servercert[] = $cert;
970 970
                     if (count($servercert) == 1) {
971
-                        if (file_put_contents($tmpDir . "/incomingserver.pem", $certPem . "\n") === FALSE) {
971
+                        if (file_put_contents($tmpDir."/incomingserver.pem", $certPem."\n") === FALSE) {
972 972
                             $this->loggerInstance->debug(4, "The (first) server certificate could not be written to $tmpDir/incomingserver.pem!\n");
973 973
                         }
974
-                        $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: " . print_r($servercert[0], true));
974
+                        $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: ".print_r($servercert[0], true));
975 975
                     } elseif (!in_array(RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS, $testresults['cert_oddities'])) {
976 976
                         $testresults['cert_oddities'][] = RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS;
977 977
                     }
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
         chdir($tmpDir);
1052 1052
         $this->loggerInstance->debug(4, "temp dir: $tmpDir\n");
1053 1053
         if ($clientcertdata !== NULL) {
1054
-            file_put_contents($tmpDir . "/client.p12", $clientcertdata);
1054
+            file_put_contents($tmpDir."/client.p12", $clientcertdata);
1055 1055
         }
1056 1056
         $testresults = [];
1057 1057
         // initialise the sub-array for cleaner parsing
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
                     'issuer' => $this->printDN($certdata['issuer']),
1148 1148
                     'validFrom' => $this->printTm($certdata['validFrom_time_t']),
1149 1149
                     'validTo' => $this->printTm($certdata['validTo_time_t']),
1150
-                    'serialNumber' => $certdata['serialNumber'] . sprintf(" (0x%X)", $certdata['serialNumber']),
1150
+                    'serialNumber' => $certdata['serialNumber'].sprintf(" (0x%X)", $certdata['serialNumber']),
1151 1151
                     'sha1' => $certdata['sha1'],
1152 1152
                     'extensions' => $certdata['extensions']
1153 1153
                 ];
Please login to merge, or discard this patch.
core/diag/Logopath.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
         $this->possibleFailureReasons = $_SESSION["SUSPECTS"] ?? []; // if we know nothing, don't talk to anyone
105 105
         $this->additionalFindings = $_SESSION["EVIDENCE"] ?? [];
106 106
 
107
-        $this->subjectPrefix = _("[eduroam Diagnostics]") . " ";
107
+        $this->subjectPrefix = _("[eduroam Diagnostics]")." ";
108 108
         $this->finalGreeting = "\n"
109 109
                 . _("(This service is in an early stage. We apologise if this is a false alert. If this is the case, please send an email report to [email protected], forwarding the entire message (including the 'SUSPECTS' and 'EVIDENCE' data at the end), and explain why this is a false positive.)")
110 110
                 . "\n"
111
-                . _("Yours sincerely,") . "\n"
111
+                . _("Yours sincerely,")."\n"
112 112
                 . "\n"
113 113
                 . _("Ed U. Roam, the eduroam diagnostics algorithm");
114 114
 
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
                 "bcc" => [],
120 120
                 "reply-to" => [Logopath::EDUROAM_OT],
121 121
                 "subject" => _("[POLICYVIOLATION NATIONAL] IdP with no entry in eduroam database"),
122
-                "body" => _("Dear NRO administrator,") . "\n"
122
+                "body" => _("Dear NRO administrator,")."\n"
123 123
                 . "\n"
124
-                . wordwrap(sprintf(_("an end-user requested diagnostics for realm %s. Real-time connectivity checks determined that the realm exists, but we were unable to find an IdP with that realm in the eduroam database."), "foo.bar")) . "\n"
124
+                . wordwrap(sprintf(_("an end-user requested diagnostics for realm %s. Real-time connectivity checks determined that the realm exists, but we were unable to find an IdP with that realm in the eduroam database."), "foo.bar"))."\n"
125 125
                 . "\n"
126
-                . _("By not listing IdPs in the eduroam database, you are violating the eduroam policy.") . "\n"
126
+                . _("By not listing IdPs in the eduroam database, you are violating the eduroam policy.")."\n"
127 127
                 . "\n"
128
-                . _("Additionally, this creates operational issues. In particular, we are unable to direct end users to their IdP for further diagnosis/instructions because there are no contact points for that IdP in the database.") . "\n"
128
+                . _("Additionally, this creates operational issues. In particular, we are unable to direct end users to their IdP for further diagnosis/instructions because there are no contact points for that IdP in the database.")."\n"
129 129
                 . "\n"
130 130
                 . "Please stop the policy violation ASAP by listing the IdP which is associated to this realm.",
131 131
             ],
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
             $handle = \core\common\OutsideComm::mailHandle();
281 281
             // let's identify outselves
282
-            $handle->FromName = CONFIG['APPEARANCE']['productname'] . " Real-Time Diagnostics System";
282
+            $handle->FromName = CONFIG['APPEARANCE']['productname']." Real-Time Diagnostics System";
283 283
             // add recipients
284 284
             foreach (Logopath::CATEGORYBINDING as $arrayName => $functionName) {
285 285
                 foreach ($theMail[$arrayName] as $onePrincipal) {
Please login to merge, or discard this patch.