Test Failed
Push — release_2_1 ( adef88...954e67 )
by Stefan
09:51
created
web/lib/user/TextTemplates.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 const DOWNLOAD_FOR_MESSAGE = 1055;
53 53
 const SB_GO_AWAY = 1060;
54 54
 const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061;
55
-const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062;
55
+const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062;
56 56
 
57 57
 
58 58
 /**
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
         ];
105 105
         $this->templates[WELCOME_ABOARD_TERMS] = "";
106 106
         foreach ($this->templates[NETWORK_TERMS_AND_PRIV] as $consortium => $terms) {
107
-            $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("Please remember that when connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.") . "</p>", $consortium, $terms['TOU_LINK'], $terms['PRIV_LINK']);
107
+            $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>"._("Please remember that when connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.")."</p>", $consortium, $terms['TOU_LINK'], $terms['PRIV_LINK']);
108 108
         }
109 109
     //    $this->templates[WELCOME_ABOARD_TERMS] .= "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>";
110 110
         $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads");
111 111
         $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("We would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), \config\ConfAssistant::CONSORTIUM['display_name']);
112 112
         $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']);
113
-        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),\config\ConfAssistant::CONSORTIUM['display_name']);
113
+        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), \config\ConfAssistant::CONSORTIUM['display_name']);
114 114
         $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), \config\ConfAssistant::CONSORTIUM['display_name']);
115 115
         $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation");
116 116
         $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']);
Please login to merge, or discard this patch.
web/skins/modern/diag/js/diag_js.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  * License: see the web/copyright.inc.php file in the file structure or
20 20
  *          <base_url>/copyright.php after deploying the software
21 21
  */
22
- ?>
22
+    ?>
23 23
 <?php
24 24
 $Gui = new \web\lib\user\Gui();
25 25
 $Gui->languageInstance->setTextDomain("diagnostics");
Please login to merge, or discard this patch.
core/common/OutsideComm.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no MX.");
124 124
             return OutsideComm::MAILDOMAIN_NO_MX;
125 125
         }
126
-        $loggerInstance->debug(5, "Domain: $domain MX: " . /** @scrutinizer ignore-type */ print_r($mx, TRUE));
126
+        $loggerInstance->debug(5, "Domain: $domain MX: "./** @scrutinizer ignore-type */ print_r($mx, TRUE));
127 127
         // create a pool of A and AAAA records for all the MXes
128 128
         $ipAddrs = [];
129 129
         foreach ($mx as $onemx) {
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
                 $ipAddrs[] = $oneipv4['ip'];
134 134
             }
135 135
             foreach ($v6list as $oneipv6) {
136
-                $ipAddrs[] = "[" . $oneipv6['ipv6'] . "]";
136
+                $ipAddrs[] = "[".$oneipv6['ipv6']."]";
137 137
             }
138 138
         }
139 139
         if (count($ipAddrs) == 0) {
140 140
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no mailserver hosts.");
141 141
             return OutsideComm::MAILDOMAIN_NO_HOST;
142 142
         }
143
-        $loggerInstance->debug(5, "Domain: $domain Addrs: " . /** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE));
143
+        $loggerInstance->debug(5, "Domain: $domain Addrs: "./** @scrutinizer ignore-type */ print_r($ipAddrs, TRUE));
144 144
         // connect to all hosts. If all can't connect, return MAILDOMAIN_NO_CONNECT. 
145 145
         // If at least one does not support STARTTLS or one of the hosts doesn't connect
146 146
         // , return MAILDOMAIN_NO_STARTTLS (one which we can't connect to we also
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         switch (\config\ConfAssistant::SMSSETTINGS['provider']) {
194 194
             case 'Nexmo':
195 195
                 // taken from https://docs.nexmo.com/messaging/sms-api
196
-                $url = 'https://rest.nexmo.com/sms/json?' . http_build_query(
196
+                $url = 'https://rest.nexmo.com/sms/json?'.http_build_query(
197 197
                                 [
198 198
                                     'api_key' => \config\ConfAssistant::SMSSETTINGS['username'],
199 199
                                     'api_secret' => \config\ConfAssistant::SMSSETTINGS['password'],
@@ -224,14 +224,14 @@  discard block
 block discarded – undo
224 224
                     $loggerInstance->debug(2, 'Problem with SMS invitation: no message was sent!');
225 225
                     return OutsideComm::SMS_NOTSENT;
226 226
                 }
227
-                $loggerInstance->debug(2, 'Total of ' . $messageCount . ' messages were attempted to send.');
227
+                $loggerInstance->debug(2, 'Total of '.$messageCount.' messages were attempted to send.');
228 228
 
229 229
                 $totalFailures = 0;
230 230
                 foreach ($decoded_response['messages'] as $message) {
231 231
                     if ($message['status'] == 0) {
232
-                        $loggerInstance->debug(2, $message['message-id'] . ": Success");
232
+                        $loggerInstance->debug(2, $message['message-id'].": Success");
233 233
                     } else {
234
-                        $loggerInstance->debug(2, $message['message-id'] . ": Failed (failure code = " . $message['status'] . ")");
234
+                        $loggerInstance->debug(2, $message['message-id'].": Failed (failure code = ".$message['status'].")");
235 235
                         $totalFailures++;
236 236
                     }
237 237
                 }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             $proto = "https://";
301 301
         }
302 302
         // then, send out the mail
303
-        $message = _("Hello,") . "\n\n" . wordwrap($introTexts[$introtext] . " " . $validity, 72) . "\n\n";
303
+        $message = _("Hello,")."\n\n".wordwrap($introTexts[$introtext]." ".$validity, 72)."\n\n";
304 304
         // default means we don't have a Reply-To.
305 305
         $replyToMessage = wordwrap(_("manually. Please do not reply to this mail; this is a send-only address."));
306 306
 
@@ -308,8 +308,8 @@  discard block
 block discarded – undo
308 308
             // see if we are supposed to add a custom message
309 309
             $customtext = $federation->getAttributes('fed:custominvite');
310 310
             if (count($customtext) > 0) {
311
-                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72) . "\n---------------------------------" .
312
-                        wordwrap($customtext[0]['value'], 72) . "\n---------------------------------\n\n";
311
+                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72)."\n---------------------------------".
312
+                        wordwrap($customtext[0]['value'], 72)."\n---------------------------------\n\n";
313 313
             }
314 314
             // and add Reply-To already now
315 315
             foreach ($federation->listFederationAdmins() as $fedadmin_id) {
@@ -325,19 +325,19 @@  discard block
 block discarded – undo
325 325
         }
326 326
         $productname = \config\Master::APPEARANCE['productname'];
327 327
         $consortium = \config\ConfAssistant::CONSORTIUM['display_name'];
328
-        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72) . "\n\n" .
329
-                $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/action_enrollment.php?token=$newtoken\n\n" .
330
-                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72) . "\n\n" .
331
-                $proto . $_SERVER['SERVER_NAME'] . \config\Master::PATHS['cat_base_url'] . "admin/\n\n" .
332
-                _("and enter the invitation token") . "\n\n" .
333
-                $newtoken . "\n\n$replyToMessage\n\n" .
334
-                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72) . "\n\n" .
335
-                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72) . "\n\n" .
328
+        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_participant), 72)."\n\n".
329
+                $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/action_enrollment.php?token=$newtoken\n\n".
330
+                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), $productname), 72)."\n\n".
331
+                $proto.$_SERVER['SERVER_NAME'].\config\Master::PATHS['cat_base_url']."admin/\n\n".
332
+                _("and enter the invitation token")."\n\n".
333
+                $newtoken."\n\n$replyToMessage\n\n".
334
+                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72)."\n\n".
335
+                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), $productname), 72)."\n\n".
336 336
                 sprintf(_("Sincerely,\n\nYour friendly folks from %s Operations"), $consortium);
337 337
 
338 338
 
339 339
 // who to whom?
340
-        $mail->FromName = \config\Master::APPEARANCE['productname'] . " Invitation System";
340
+        $mail->FromName = \config\Master::APPEARANCE['productname']." Invitation System";
341 341
 
342 342
         if (isset(\config\Master::APPEARANCE['invitation-bcc-mail']) && \config\Master::APPEARANCE['invitation-bcc-mail'] !== NULL) {
343 343
             $mail->addBCC(\config\Master::APPEARANCE['invitation-bcc-mail']);
Please login to merge, or discard this patch.
web/admin/action_req_certificate.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     // also send user back to the overview page
73 73
     if (isset($_POST['requestcert']) && $_POST['requestcert'] == \web\lib\common\FormElements::BUTTON_SAVE) {
74 74
         // basic sanity checks before we hand this over to openssl
75
-        $sanitisedCsr = $validator->string($_POST['CSR'] ?? "" , TRUE);
75
+        $sanitisedCsr = $validator->string($_POST['CSR'] ?? "", TRUE);
76 76
         if (openssl_csr_get_public_key($sanitisedCsr) === FALSE) {
77 77
             throw new Exception("Sorry: Unable to parse the submitted public key - no public key inside?");
78 78
         }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 $fed = $validator->existingFederation($_POST['NRO-list']);
87 87
                 $country = strtoupper($fed->tld);
88 88
                 $DN[] = "C=$country";
89
-                $DN[] = "O=NRO of " . $cat->knownFederations[strtoupper($fed->tld)];
89
+                $DN[] = "O=NRO of ".$cat->knownFederations[strtoupper($fed->tld)];
90 90
                 $DN[] = "CN=comes.from.eduroam.db";
91 91
                 $policies[] = "eduroam IdP";
92 92
                 $policies[] = "eduroam SP";
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
             default:
105 105
                 throw new Exception("Sorry: Unknown level of issuance requested.");
106 106
         }
107
-        echo "<p>" . _("Requesting a certificate with the following properties");
107
+        echo "<p>"._("Requesting a certificate with the following properties");
108 108
         echo "<ul>";
109
-        echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>";
110
-        echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN) . "</li>";
111
-        echo "<li>" . _("Requester Contact Details: will come from eduroam DB (using stub 'Someone, &lt;[email protected]&gt;').") . "</li>";
109
+        echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>";
110
+        echo "<li>"._("Distinguished Name: ").implode(", ", $DN)."</li>";
111
+        echo "<li>"._("Requester Contact Details: will come from eduroam DB (using stub 'Someone, &lt;[email protected]&gt;').")."</li>";
112 112
         echo "</ul></p>";
113 113
         /* $ossl = proc_open("openssl req -subj '/".implode("/", $DN)."'", [ 0 => ["pipe", "r"], 1 => ["pipe", "w"], 2 => [ "file", "/tmp/voodoo-error", "a"] ], $pipes);
114 114
         if (is_resource($ossl)) {
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
         }
123 123
         echo "<p>"._("This is the new CSR (return code was $retval)")."<pre>$newCsr</pre></p>"; */
124 124
         $vettedCsr = $validator->string($_POST['CSR'], true);
125
-        $newCsrWithMeta = ["CSR" => /* $newCsr */ $vettedCsr, "USERNAME" => "Someone", "USERMAIL" => "[email protected]", "SUBJECT" => implode(",", $DN) ,"FED" => $country];
125
+        $newCsrWithMeta = ["CSR" => /* $newCsr */ $vettedCsr, "USERNAME" => "Someone", "USERMAIL" => "[email protected]", "SUBJECT" => implode(",", $DN), "FED" => $country];
126 126
         // our certs can be good for max 5 years
127 127
         $fed->requestCertificate($newCsrWithMeta, 1825);
128 128
         echo "<p>"._("The certificate was requested.")."</p>";
129 129
         ?>
130 130
         <form action="overview_certificates.php" method="GET">
131
-            <button type="submit"><?php echo _("Back to Certificate Overview");?></button>
131
+            <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button>
132 132
         </form>
133 133
     <?php
134 134
     echo $deco->footer();
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
 
138 138
     // if we did not get a SAVE button, display UI for a fresh request instead
139 139
     ?>
140
-    <h2><?php echo _("1. Certificate Holder Details");?></h2>
140
+    <h2><?php echo _("1. Certificate Holder Details"); ?></h2>
141 141
     <form action="action_req_certificate.php" method="POST">
142 142
         <input type="radio" name="LEVEL" id="NRO" value="NRO" checked><?php printf(_("Certificate for %s role"), $uiElements->nomenclatureFed); ?></input>
143 143
         <?php
144 144
         if (count($feds) == 1) {
145 145
             $fedObject = new \core\Federation($feds[0]['value']);
146
-            echo " <strong>" . $cat->knownFederations[$fedObject->tld] . "</strong>";
147
-            echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $fedObject->tld . '"/>';
146
+            echo " <strong>".$cat->knownFederations[$fedObject->tld]."</strong>";
147
+            echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$fedObject->tld.'"/>';
148 148
         } else {
149 149
             ?>
150 150
             <select name="NRO-list" id="NRO-list">
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                 <?php
153 153
                 foreach ($feds as $oneFed) {
154 154
                     $fedObject = new \core\Federation($oneFed['value']);
155
-                    echo '<option value="' . strtoupper($fedObject->tld) . '">' . $cat->knownFederations[$fedObject->tld] . "</option>";
155
+                    echo '<option value="'.strtoupper($fedObject->tld).'">'.$cat->knownFederations[$fedObject->tld]."</option>";
156 156
                 }
157 157
                 ?>
158 158
             </select>
@@ -172,15 +172,15 @@  discard block
 block discarded – undo
172 172
                 }
173 173
             }
174 174
             foreach ($allIdPs as $id => $name) {
175
-                echo '<option value="' . $id . '">' . $name . "</option>";
175
+                echo '<option value="'.$id.'">'.$name."</option>";
176 176
             }
177 177
             ?>
178 178
         </select>
179 179
         <br/>
180
-        <h2><?php echo _("2. CSR generation");?></h2>
181
-        <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:");?></p>
180
+        <h2><?php echo _("2. CSR generation"); ?></h2>
181
+        <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p>
182 182
         <p>openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /DC=test/DC=test/DC=eduroam/C=XY/O=WillBeReplaced/CN=will.be.replaced</p>
183
-        <h2><?php echo _("3. Submission");?></h2>
183
+        <h2><?php echo _("3. Submission"); ?></h2>
184 184
         <?php echo _("Please paste your CSR here:"); ?><br/><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/>
185 185
     <button type="submit" name="requestcert" id="requestcert" value="<?php echo \web\lib\common\FormElements::BUTTON_SAVE ?>"><?php echo _("Send request"); ?></button>
186 186
 </form>
Please login to merge, or discard this patch.