Test Failed
Branch silverbullet (05f8b4)
by Brook
05:51
created
web/user/js/roll.php 1 patch
Indentation   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -68,13 +68,12 @@
 block discarded – undo
68 68
 
69 69
 <?php
70 70
 /**
71
-  * The OS object holds operating system descriptions
72
-  * @param name is the main title
73
-  * @param subtitle - the subtitle
74
-  * @param path - the path to the scriin-dump image
75
-  * @param signed - if true show information that the module is signed
76
-    
77
-*/
71
+ * The OS object holds operating system descriptions
72
+ * @param name is the main title
73
+ * @param subtitle - the subtitle
74
+ * @param path - the path to the scriin-dump image
75
+ * @param signed - if true show information that the module is signed
76
+ */
78 77
 ?>
79 78
 
80 79
 function OS(name, subtitle, path, signed) {
Please login to merge, or discard this patch.
web/user/js/cat_js.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 }
332 332
 
333 333
 <?php if(isset($_REQUEST['idp']) && $_REQUEST['idp']) { 
334
-      print "front_page = 0;\n";
334
+        print "front_page = 0;\n";
335 335
 } ?>
336 336
 
337 337
 function showTOU(){
@@ -469,9 +469,9 @@  discard block
 block discarded – undo
469 469
     $p_id = (isset($_REQUEST['profile']) && $_REQUEST['profile']) ? $_REQUEST['profile'] : 0; 
470 470
     if(! is_numeric($p_id))
471 471
         exit;
472
-   print 'listProfiles('.$_REQUEST['idp'].','.$p_id.');';
472
+    print 'listProfiles('.$_REQUEST['idp'].','.$p_id.');';
473 473
 }
474
- ?>
474
+    ?>
475 475
 
476 476
 $(".signin").click(function(event){
477 477
      pressedButton = $(this);
@@ -532,12 +532,12 @@  discard block
 block discarded – undo
532 532
         });
533 533
 DiscoJuice.Constants.Countries = {
534 534
 <?php 
535
-  $C = $Gui->printCountryList(1);
536
-     $ret = '';
537
-   foreach ($C as $key => $val) {
535
+    $C = $Gui->printCountryList(1);
536
+        $ret = '';
537
+    foreach ($C as $key => $val) {
538 538
     $ret .= "'$key': \"$val\",";
539
-   }
540
-   echo substr($ret, 0, -1);
539
+    }
540
+    echo substr($ret, 0, -1);
541 541
 ?>
542 542
         };
543 543
 
Please login to merge, or discard this patch.
web/user/cat_back.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 // extract request parameters; action is mandatory
18 18
 if(!isset($_REQUEST['action']))
19
-   exit;
19
+    exit;
20 20
 
21 21
 $action  = $_REQUEST['action'];
22 22
 $id      = ( isset($_REQUEST['id'])      ? $_REQUEST['id']      : FALSE );
Please login to merge, or discard this patch.
web/download.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 $p = new Profile($profile_id);
43 43
 
44 44
 if(!$p->institution || $p->institution !== $inst_id) {
45
-  header("HTTP/1.0 404 Not Found");
46
-  return;
45
+    header("HTTP/1.0 404 Not Found");
46
+    return;
47 47
 }
48 48
 
49 49
 // now we generate the installer
Please login to merge, or discard this patch.
web/diag/action_userdiag.php 1 patch
Braces   +23 added lines, -16 removed lines patch added patch discarded remove patch
@@ -67,10 +67,11 @@  discard block
 block discarded – undo
67 67
 
68 68
 function mainpage_url() {
69 69
     $main_url = valid_host($_SERVER['HTTP_HOST']);
70
-    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on")
71
-        $main_url = "https://" . $main_url;
72
-    else
73
-        $main_url = "http://" . $main_url;
70
+    if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
71
+            $main_url = "https://" . $main_url;
72
+    } else {
73
+            $main_url = "http://" . $main_url;
74
+    }
74 75
     $main_url .= substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/diag/"));
75 76
     return $main_url;
76 77
 }
@@ -135,8 +136,9 @@  discard block
 block discarded – undo
135 136
                     array_multisort($name, SORT_ASC, SORT_LOCALE_STRING, $displaylist);
136 137
                     setlocale(LC_ALL, $current_locale);
137 138
 
138
-                    foreach ($displaylist as $id => $oneinst)
139
-                        echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>";
139
+                    foreach ($displaylist as $id => $oneinst) {
140
+                                            echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>";
141
+                    }
140 142
                     ?>
141 143
                 </select>
142 144
                 <button type='submit' class='submit'><?php echo _("Submit Information"); ?></button>
@@ -197,10 +199,12 @@  discard block
 block discarded – undo
197 199
                 $checkresult[$number] = $check['instance']->UDP_reachability($number, FALSE, FALSE);
198 200
                 if ($checkresult[$number] == RETVAL_CONVERSATION_REJECT) { // so now things work?!
199 201
                     // either a packet size or Operator-Name problem!
200
-                    if ($check['instance']->UDP_reachability($number, TRUE, FALSE) != RETVAL_CONVERSATION_REJECT)
201
-                        $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""];
202
-                    if ($check['instance']->UDP_reachability($number, FALSE, TRUE) != RETVAL_CONVERSATION_REJECT)
203
-                        $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""];
202
+                    if ($check['instance']->UDP_reachability($number, TRUE, FALSE) != RETVAL_CONVERSATION_REJECT) {
203
+                                            $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""];
204
+                    }
205
+                    if ($check['instance']->UDP_reachability($number, FALSE, TRUE) != RETVAL_CONVERSATION_REJECT) {
206
+                                            $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""];
207
+                    }
204 208
                 } else { // still no response or immediate reject
205 209
                     // if this is a CAT realm with anon ID set, we can't be seeing an NPS ignorance problem
206 210
                     // and consequently, the realm has actual issues
@@ -234,12 +238,13 @@  discard block
 block discarded – undo
234 238
 // re-write check history with that extra knowledge
235 239
     $copycat = $realmproblems;
236 240
 
237
-    foreach ($realmproblems as &$problem)
238
-        if ($problem['STATUS'] == "REALM_POSSIBLY_NPS")
241
+    foreach ($realmproblems as &$problem) {
242
+            if ($problem['STATUS'] == "REALM_POSSIBLY_NPS")
239 243
             foreach ($copycat as $otherproblem)
240 244
                 if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] != "REALM_POSSIBLY_NPS")
241 245
                     if ($otherproblem['STATUS'] == "REACHABLE") { // worked elsewhere, but not on this probe:
242 246
                         $problem['STATUS'] = "REALM_DOWN";
247
+    }
243 248
                     } else { // inherit other problem; in any case not an NPS problem
244 249
                         $problem['STATUS'] = $otherproblem['STATUS'];
245 250
                     }
@@ -249,11 +254,12 @@  discard block
 block discarded – undo
249 254
 
250 255
     $copycat = $realmproblems;
251 256
 
252
-    foreach ($realmproblems as &$problem)
253
-        if ($problem['STATUS'] == "REALM_DOWN")
257
+    foreach ($realmproblems as &$problem) {
258
+            if ($problem['STATUS'] == "REALM_DOWN")
254 259
             foreach ($copycat as $otherproblem)
255 260
                 if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] == "REACHABLE")
256 261
                     $problem['STATUS'] = "INFRASTRUCTURE";
262
+    }
257 263
     unset($problem);
258 264
 
259 265
 // finally, extract all certprobs we got from the reachability checks; merge from all
@@ -264,8 +270,9 @@  discard block
 block discarded – undo
264 270
     foreach ($checks as $check) {
265 271
         $instance = $check['instance'];
266 272
         $resultset = $instance->UDP_reachability_result;
267
-        foreach ($resultset as $result)
268
-            $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']);
273
+        foreach ($resultset as $result) {
274
+                    $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']);
275
+        }
269 276
     }
270 277
     echo "<pre>";
271 278
     print_r($realmproblems);
Please login to merge, or discard this patch.
core/RADIUSTests.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -328,7 +328,6 @@
 block discarded – undo
328 328
      * - RETVAL_NOT_CONFIGURED; needs Config::$RADIUSTESTS['TLS-discoverytag']
329 329
      * - RETVAL_INVALID (at least one format error)
330 330
      * - RETVAL_OK (all fine)
331
-
332 331
      * @return int one of two RETVALs above
333 332
      */
334 333
     public function NAPTR_compliance() {
Please login to merge, or discard this patch.
web/admin/action_fedcheck.php 1 patch
Braces   +26 added lines, -17 removed lines patch added patch discarded remove patch
@@ -44,10 +44,11 @@  discard block
 block discarded – undo
44 44
     // NAPTR existence check
45 45
     $tabletext .= "<td>";
46 46
     $naptr = $testsuite->NAPTR();
47
-    if ($naptr != RETVAL_NOTCONFIGURED)
48
-        switch ($naptr) {
47
+    if ($naptr != RETVAL_NOTCONFIGURED) {
48
+            switch ($naptr) {
49 49
             case RETVAL_NONAPTR:
50 50
                 $tabletext .= _("No NAPTR records");
51
+    }
51 52
                 break;
52 53
             case RETVAL_ONLYUNRELATEDNAPTR:
53 54
                 $tabletext .= sprintf(_("No associated NAPTR records"));
@@ -73,8 +74,9 @@  discard block
 block discarded – undo
73 74
                 }
74 75
                 if ($srv > 0) {
75 76
                     $hosts = $testsuite->NAPTR_hostnames();
76
-                    if ($hosts == RETVAL_INVALID)
77
-                        $NAPTR_issues = true;
77
+                    if ($hosts == RETVAL_INVALID) {
78
+                                            $NAPTR_issues = true;
79
+                    }
78 80
                 }
79 81
                 break;
80 82
         }
@@ -91,14 +93,17 @@  discard block
 block discarded – undo
91 93
     foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
92 94
         $testsuite->UDP_reachability($hostindex, true, true);
93 95
         $results = $testsuite->UDP_reachability_result[$hostindex];
94
-        if ($results['packetflow_sane'] != TRUE)
95
-            $UDPErrors = true;
96
-        if (empty($results['packetflow'][11]))
97
-            $UDPErrors = true;
96
+        if ($results['packetflow_sane'] != TRUE) {
97
+                    $UDPErrors = true;
98
+        }
99
+        if (empty($results['packetflow'][11])) {
100
+                    $UDPErrors = true;
101
+        }
98 102
         if (count($results['cert_oddities']) > 0) {
99
-            foreach ($results['cert_oddities'] as $oddity)
100
-                if ($oddity['level'] > $certBiggestOddity)
103
+            foreach ($results['cert_oddities'] as $oddity) {
104
+                            if ($oddity['level'] > $certBiggestOddity)
101 105
                     $certBiggestOddity = $oddity['level'];
106
+            }
102 107
         }
103 108
     }
104 109
 
@@ -119,8 +124,9 @@  discard block
 block discarded – undo
119 124
     if ($naptr > 0 && count($testsuite->NAPTR_hostname_records) > 0) {
120 125
         foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) {
121 126
             $retval = $testsuite->TLS_clients_side_check($addr);
122
-            if ($retval != RETVAL_OK && $retval != RETVAL_SKIPPED)
123
-                $dynamicErrors = true;
127
+            if ($retval != RETVAL_OK && $retval != RETVAL_SKIPPED) {
128
+                            $dynamicErrors = true;
129
+            }
124 130
         }
125 131
     }
126 132
     if (!$dynamicErrors) {
@@ -162,10 +168,11 @@  discard block
 block discarded – undo
162 168
 $profiles_showtime = [];
163 169
 $profiles_readyconf = [];
164 170
 
165
-foreach ($allIDPs as $index => $oneidp)
171
+foreach ($allIDPs as $index => $oneidp) {
166 172
     foreach ($oneidp['instance']->listProfiles() as $profile)
167 173
         if ($profile->isShowtime()) {
168 174
             $profiles_showtime[] = ['idp' => $oneidp['instance'], 'profile' => $profile];
175
+}
169 176
         } else if ($profile->readyForShowtime()) {
170 177
             $profiles_confready[] = ['idp' => $oneidp['instance'], 'profile' => $profile];
171 178
         }
@@ -173,16 +180,18 @@  discard block
 block discarded – undo
173 180
 if (count($profiles_showtime) > 0) {
174 181
     echo "<h2>" . _("Profiles marked as visible (V)") . "</h2>" . "<table>";
175 182
     echo rowdescription();
176
-    foreach ($profiles_showtime as $oneprofile)
177
-        echo profilechecks($oneprofile['idp'], $oneprofile['profile']);
183
+    foreach ($profiles_showtime as $oneprofile) {
184
+            echo profilechecks($oneprofile['idp'], $oneprofile['profile']);
185
+    }
178 186
     echo "</table>";
179 187
 }
180 188
 
181 189
 if (count($profiles_confready) > 0) {
182 190
     echo "<h2>" . _("Profiles with sufficient configuration, not marked as visible (C)") . "</h2>" . "<table>";
183 191
     echo rowdescription();
184
-    foreach ($profiles_confready as $oneprofile)
185
-        echo profilechecks($oneprofile['idp'], $oneprofile['profile']);
192
+    foreach ($profiles_confready as $oneprofile) {
193
+            echo profilechecks($oneprofile['idp'], $oneprofile['profile']);
194
+    }
186 195
     echo "</table>";
187 196
 }
188 197
 ?>
Please login to merge, or discard this patch.
web/user/faq.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -2,63 +2,63 @@  discard block
 block discarded – undo
2 2
 $FAQ = [];
3 3
 
4 4
 array_push($FAQ,
5
-      [
5
+        [
6 6
         'title'=>sprintf(_("My institution is not listed. Can't I just use any of the other ones?")),
7 7
         'text'=>sprintf(_("No! The installers contain security settings which are specific to the institution. If you are not from that institution, your computer will detect that you are about to send your username and credential to an unauthorised server and will abort the login. Using a different institution installer is <i>guaranteed to not work</i>!"))
8
-         ]);
8
+            ]);
9 9
 
10 10
 array_push($FAQ,
11
-      [
11
+        [
12 12
         'title'=>sprintf(_("What can I do to get my institution listed?")),
13 13
         'text'=>sprintf(_("Contact %s administrators at your home institution and complain. It will take at most one hour of their time to get things done."),CONFIG['CONSORTIUM']['name'])
14 14
 ]);
15 15
 
16 16
 array_push($FAQ,
17
-      [
17
+        [
18 18
         'title'=>sprintf(_("My device is not listed! Does that mean I can't do %s?"),CONFIG['CONSORTIUM']['name']),
19 19
         'text'=>sprintf(_("No. The CAT tool can only support Operating Systems which can be automatically configured in some way. Many other devices can still be used with %s, but must be configured manually. Please contact your %s Identity Provider to get help in setting up such a device."),CONFIG['CONSORTIUM']['name'],CONFIG['CONSORTIUM']['name'])
20
-      ]);
20
+        ]);
21 21
 
22 22
 array_push($FAQ,
23
-      [
23
+        [
24 24
         'title'=>sprintf(_("I can connect to %s simply by providing username and password, what is the point of using an installer?"),CONFIG['CONSORTIUM']['name']),
25 25
         'text'=>sprintf(_("When you are connecting from an unconfigured device your security is at risk. The very point of preconfiguration is to set up security, when this is done, your device will first confirm that it talks to the correct authentication server and will never send your password to an untrusted one."))
26 26
 ]);
27 27
 
28 28
 if (CONFIG['CONSORTIUM']['name'] == "eduroam") {
29
-   array_push($FAQ,
30
-         [
31
-           'title'=>sprintf(_("What is this eduroam thing anyway?")),
32
-           'text'=>sprintf(_("eduroam is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all eduroam hotspots on the planet. There are several million eduroam users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the eduroam homepage</a> for more details."))
33
-         ]);
29
+    array_push($FAQ,
30
+            [
31
+            'title'=>sprintf(_("What is this eduroam thing anyway?")),
32
+            'text'=>sprintf(_("eduroam is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all eduroam hotspots on the planet. There are several million eduroam users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the eduroam homepage</a> for more details."))
33
+            ]);
34 34
 }
35 35
 
36 36
 array_push($FAQ,
37
-      [
37
+        [
38 38
         'title'=>sprintf(_("Is it safe to use %s installers?"),CONFIG['APPEARANCE']['productname']),
39 39
         'text'=>sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."),CONFIG['APPEARANCE']['productname']).' '.( isset(CONFIG['CONSORTIUM']['signer_name']) && CONFIG['CONSORTIUM']['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."),CONFIG['APPEARANCE']['productname'],CONFIG['CONSORTIUM']['signer_name']):""),
40 40
         
41 41
 ]);
42 42
 
43 43
 array_push($FAQ,
44
-      [
44
+        [
45 45
         'title'=>_("Windows 'SmartScreen' or 'Internet Explorer' tell me that the file is not commonly downloaded and possibly harmful. Should I be concerned?"),
46 46
         'text'=>_("Contrary to what the name suggests, 'SmartScreen' isn't actually very smart. The warning merely means that the file has not yet been downloaded by enough users to make Microsoft consider it popular (which would strangely enough make it be considered 'safe'). This message alone is not a security problem.")." ".(isset(CONFIG['CONSORTIUM']['signer_name']) && CONFIG['CONSORTIUM']['signer_name'] != "" ? sprintf(_("So long as the file is carrying a valid signature from %s, the download is safe."),CONFIG['CONSORTIUM']['signer_name'])." ":"").sprintf(_("Please see also Microsoft's FAQ regarding SmartScreen at %s."),"<a href='http://windows.microsoft.com/en-US/windows7/SmartScreen-Filter-frequently-asked-questions-IE9?SignedIn=1'>Microsoft FAQ</a>")
47 47
         
48 48
 ]);
49 49
 
50 50
 array_push($FAQ,
51
-      [
51
+        [
52 52
         'title'=>sprintf(_("I can see %s network and my device is configured but it does not connect, what can be the cause?"),CONFIG['CONSORTIUM']['name']),
53
-      'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your home institution and report the problem, the administrators should be able to trace your connections."),CONFIG['CONSORTIUM'][
53
+        'text'=>sprintf(_("There can be a number of different reasons. The network you see may not be a genuine %s one and your device silently drops the connection attempt; there may be something wrong with the configuration of the network; your account may have expired; there may be a connection problem with your home authentication server; you may have broken the regulations of the network you are using and have been refused access as a consequence. You should contact your home institution and report the problem, the administrators should be able to trace your connections."),CONFIG['CONSORTIUM'][
54 54
 'name'])
55 55
 ]);
56 56
 
57 57
 array_push($FAQ,
58
-      [
58
+        [
59 59
         'title'=>sprintf(_("I have a question about this web site. Whom should I contact?")),
60 60
         'text'=>sprintf(_("You should send a mail to %s."),CONFIG['APPEARANCE']['support-contact']['display'])
61
-      ]);
61
+        ]);
62 62
 
63 63
 /**
64 64
  * This is a template for further FAQ entries. Simply copy&paste and add more
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
     <?php
82 82
     $i =0;
83 83
     foreach ($FAQ as $faq) {
84
-       print '<a href="#toc'.$i.'">'.$faq['title']."</a><br>\n";
85
-       $i++;
84
+        print '<a href="#toc'.$i.'">'.$faq['title']."</a><br>\n";
85
+        $i++;
86 86
     }
87 87
     ?>
88 88
     </div>
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
     <?php
91 91
     $i =0;
92 92
     foreach ($FAQ as $faq) {
93
-      print "<dt><a name=toc$i>".$faq['title']."</a></dt>\n<dd>".$faq['text']."</dd>\n";
94
-      $i++;
93
+        print "<dt><a name=toc$i>".$faq['title']."</a></dt>\n<dd>".$faq['text']."</dd>\n";
94
+        $i++;
95 95
     }
96 96
     ?>
97 97
 </dl>
Please login to merge, or discard this patch.
devices/redirect_dev/RedirectDev.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,15 +2,15 @@
 block discarded – undo
2 2
 require_once('DeviceConfig.php');
3 3
 
4 4
 class Device_RedirectDev extends DeviceConfig {
5
-   /**
6
-    * Constructs a Device object.
7
-    *
8
-    * @final not to be redefined
9
-    */
5
+    /**
6
+     * Constructs a Device object.
7
+     *
8
+     * @final not to be redefined
9
+     */
10 10
     final public function __construct() {
11 11
         parent::__construct();
12
-      $this->supportedEapMethods  = [EAPTYPE_NONE];
13
-      $this->loggerInstance->debug(4,"RedirectEx called");
12
+        $this->supportedEapMethods  = [EAPTYPE_NONE];
13
+        $this->loggerInstance->debug(4,"RedirectEx called");
14 14
     }
15 15
     public function writeDeviceInfo() {
16 16
         $out = "<p>";
Please login to merge, or discard this patch.