Test Setup Failed
Push — release_2_1 ( 12ba21...8865c9 )
by Stefan
07:36
created
web/admin/css/eapSorter.css.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 ol.eapmethods { list-style-position: inside; margin: 0; padding: 0px; padding-top: 20px; padding-bottom: 0px; width: 20em; }
30 30
 ol.eapmethods li{
31 31
     background: #CCF;
32
-    border-<?php echo $start;?>-style: inset;
33
-    border-<?php echo $start;?>-width: 1px;
34
-    border-<?php echo $start;?>-color: #8BBACB;
32
+    border-<?php echo $start; ?>-style: inset;
33
+    border-<?php echo $start; ?>-width: 1px;
34
+    border-<?php echo $start; ?>-color: #8BBACB;
35 35
     border-top-style: inset;
36 36
     border-top-width: 1px;
37 37
     border-top-color: #8BBACB;
38
-    border-<?php echo $end;?>-style: outset;
39
-    border-<?php echo $end;?>-width: 2px;
40
-    border-<?php echo $end;?>-color: #043D52;
38
+    border-<?php echo $end; ?>-style: outset;
39
+    border-<?php echo $end; ?>-width: 2px;
40
+    border-<?php echo $end; ?>-color: #043D52;
41 41
     border-bottom-style: outset;
42 42
     border-bottom-width: 2px;
43 43
     border-bottom-color: #043D52;
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
     background-position:95% 50%;
49 49
     margin: 2px 0px 2px 0px;
50 50
     padding: 3px;
51
-    padding-<?php echo $start;?>: 1em;
52
-    padding-<?php echo $end;?>: 0px;
51
+    padding-<?php echo $start; ?>: 1em;
52
+    padding-<?php echo $end; ?>: 0px;
53 53
 }
54 54
 
55 55
 table.eaptable td {
Please login to merge, or discard this patch.
web/admin/css/silverbullet.css.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,16 +80,16 @@
 block discarded – undo
80 80
     margin-bottom:3px;
81 81
 }
82 82
 .sb-date-picker{
83
-    padding-<?php echo $end;?>:25px;
83
+    padding-<?php echo $end; ?>:25px;
84 84
     width: 140px;
85 85
 }
86 86
 .sb-date-button{
87
-    margin-<?php echo $start;?>:-30px;
87
+    margin-<?php echo $start; ?>:-30px;
88 88
     min-height: 22px;
89
-    border-<?php echo $start;?>-style: solid;
89
+    border-<?php echo $start; ?>-style: solid;
90 90
     border-top-style: solid;
91
-    border-<?php echo $end;?>-style: solid;
92
-    border-<?php echo $end;?>-width: 1px;
91
+    border-<?php echo $end; ?>-style: solid;
92
+    border-<?php echo $end; ?>-width: 1px;
93 93
     border-bottom-width: 1px;
94 94
     border-radius: 1px;
95 95
     box-shadow: 0px 0px 0px #666666;
Please login to merge, or discard this patch.
web/admin/inc/overview_js.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
     $langInstance = new core\common\Language();
70 70
     $end = $langInstance->rtl ? "left" : "right";
71 71
     ?>
72
-    pressedButton.next().append('<span style="padding-<?php echo $end;?>:1em">'+msg+'<\/span>');
72
+    pressedButton.next().append('<span style="padding-<?php echo $end; ?>:1em">'+msg+'<\/span>');
73 73
     }
74 74
     );
75 75
     }
Please login to merge, or discard this patch.
core/common/Language.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
         $loggerInstance = new \core\common\Logging();
82 82
         $olddomain = textdomain(NULL);
83 83
         $loggerInstance->debug(4, "set_locale($domain)\n");
84
-        $loggerInstance->debug(4, ROOT . "\n");
84
+        $loggerInstance->debug(4, ROOT."\n");
85 85
         textdomain($domain);
86
-        bindtextdomain($domain, ROOT . "/translation/");
86
+        bindtextdomain($domain, ROOT."/translation/");
87 87
         bind_textdomain_codeset($domain, "UTF-8");
88 88
         return $olddomain;
89 89
     }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
             // check if this language is supported by the CAT config
138 138
             foreach (\config\Master::LANGUAGES as $language => $value) {
139
-                if (preg_match("/^" . $language . ".*/", $tryLang)) {
139
+                if (preg_match("/^".$language.".*/", $tryLang)) {
140 140
                     $localeTmp = $value['locale'];
141 141
                     $langIndex = $language; // ???
142 142
                     break;
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
             }
153 153
         }
154 154
         $isRtl = \config\Master::LANGUAGES[$langIndex]['rtl'];
155
-        putenv("LC_ALL=" . $theLocale);
155
+        putenv("LC_ALL=".$theLocale);
156 156
         $_SESSION['language'] = $langIndex;
157 157
         $loggerInstance->debug(4, "selected lang:$langIndex:$theLocale\n");
158 158
         $loggerInstance->debug(4, print_r($langConverted, true));
159
-        return([$langIndex, $theLocale,$isRtl]);
159
+        return([$langIndex, $theLocale, $isRtl]);
160 160
     }
161 161
 
162 162
     /**
Please login to merge, or discard this patch.
web/skins/modern/user/cat_info.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
          " . $Tou['title'] . "
52 52
     </h1>
53 53
 <div id='tou_1'>" . $Tou['subtitle'] .
54
-               '<div style="direction:ltr">' . $Tou['short'] . "</div>
54
+                '<div style="direction:ltr">' . $Tou['short'] . "</div>
55 55
 </div>
56 56
 <div id='all_tou_link'><a href='javascript:showTOU()'>Click here to see the full terms</a></div>
57 57
 <div id='tou_2' style='display:none; padding-top:20px; direction:ltr'>" .
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
  * the receiving end to strip this marker and not add the title by itself.
32 32
  *
33 33
  */
34
-require_once dirname(dirname(dirname((dirname(dirname(__FILE__)))))) . "/config/_config.php";
34
+require_once dirname(dirname(dirname((dirname(dirname(__FILE__))))))."/config/_config.php";
35 35
 
36 36
 $Gui = new \web\lib\user\Gui();
37 37
 
@@ -41,46 +41,46 @@  discard block
 block discarded – undo
41 41
 $subpage = $_REQUEST['subpage'];
42 42
 switch ($page) {
43 43
     case 'about':
44
-        include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/user/about_cat.inc.php";
44
+        include_once dirname(dirname(dirname(dirname(__FILE__))))."/user/about_cat.inc.php";
45 45
         $out = "<div class='padding'>$out</div>";
46 46
         break;
47 47
     case 'tou':
48
-        include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/user/tou.inc.php";
48
+        include_once dirname(dirname(dirname(dirname(__FILE__))))."/user/tou.inc.php";
49 49
         $out = "no_title<div>
50 50
            <h1>
51
-         " . $Tou['title'] . "
51
+         " . $Tou['title']."
52 52
     </h1>
53
-<div id='tou_1'>" . $Tou['subtitle'] .
54
-               '<div style="direction:ltr">' . $Tou['short'] . "</div>
53
+<div id='tou_1'>" . $Tou['subtitle'].
54
+               '<div style="direction:ltr">'.$Tou['short']."</div>
55 55
 </div>
56 56
 <div id='all_tou_link'><a href='javascript:showTOU()'>Click here to see the full terms</a></div>
57 57
 <div id='tou_2' style='display:none; padding-top:20px; direction:ltr'>" .
58
-                $Tou['full'] . "
58
+                $Tou['full']."
59 59
 </div>
60 60
 </div>
61 61
 ";
62 62
         break;
63 63
     case 'help':
64
-        include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/user/faq.inc.php";
64
+        include_once dirname(dirname(dirname(dirname(__FILE__))))."/user/faq.inc.php";
65 65
         switch ($subpage) {
66 66
             case 'contact':
67 67
             case 'idp_not_listed':
68 68
             case 'device_not_listed':
69 69
             case 'what_is_eduroam':
70
-                $out = "no_title<div><h1>" . _("Help") . "</h1>";
70
+                $out = "no_title<div><h1>"._("Help")."</h1>";
71 71
                 foreach ($Faq as $faqItem) {
72 72
                     if (!empty($faqItem['id']) && $faqItem['id'] == $subpage) {
73
-                        $out .= "<div><h3>" . $faqItem['title'] . "</h3>\n";
74
-                        $out .= "" . $faqItem['text'] . "</div>\n";
73
+                        $out .= "<div><h3>".$faqItem['title']."</h3>\n";
74
+                        $out .= "".$faqItem['text']."</div>\n";
75 75
                     }
76 76
                 }
77 77
                 $out .= "</div>";
78 78
                 break;
79 79
             case 'faq':
80
-                $out = "no_title<div><h1>" . _("Frequently Asked Questions") . "</h1>";
80
+                $out = "no_title<div><h1>"._("Frequently Asked Questions")."</h1>";
81 81
                 foreach ($Faq as $faqItem) {
82
-                    $out .= "<div><h3>" . $faqItem['title'] . "</h3>\n";
83
-                    $out .= "" . $faqItem['text'] . "</div>\n";
82
+                    $out .= "<div><h3>".$faqItem['title']."</h3>\n";
83
+                    $out .= "".$faqItem['text']."</div>\n";
84 84
                 }
85 85
                 $out .= "</div>";
86 86
                 break;
@@ -104,15 +104,15 @@  discard block
 block discarded – undo
104 104
                     $rn = uniqid();
105 105
                     $_SESSION['remindIdP'] = $rn;
106 106
                     $out .= "<input type='hidden' id='remindIdPs' value='$rn'>";
107
-                    $out .= "<p><button type='button' onclick='goAdmin(); return(false);'>" . _("Login") . "</button>";
108
-                    $out .= "<br/><br/><p>" . _("Did you forget with which Identity Provider you logged in to the system? We can try to find out if you specify the email address with which you were invited to the system in the box below. This may not work if you were invited from a third-party website via the AdminAPI.") . "</p>";
109
-                    $out .= "<input id='remindIdP' type='text'/><button onclick='remindIdPF(); return false;'>" . _("Get IdP Reminder") . "</button>";
107
+                    $out .= "<p><button type='button' onclick='goAdmin(); return(false);'>"._("Login")."</button>";
108
+                    $out .= "<br/><br/><p>"._("Did you forget with which Identity Provider you logged in to the system? We can try to find out if you specify the email address with which you were invited to the system in the box below. This may not work if you were invited from a third-party website via the AdminAPI.")."</p>";
109
+                    $out .= "<input id='remindIdP' type='text'/><button onclick='remindIdPF(); return false;'>"._("Get IdP Reminder")."</button>";
110 110
                     $out .= "<div id='remindIdPd'><span id='remindIdPh'></span><ul id='remindIdPl'></ul></div>";
111 111
                     $out = "<div  class='padding'>$out</div>";
112 112
                 }
113 113
                 break;
114 114
             case 'develop':
115
-                include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/user/devel.inc.php";
115
+                include_once dirname(dirname(dirname(dirname(__FILE__))))."/user/devel.inc.php";
116 116
                 $out = "<div class='padding'>$out</div>";
117 117
                 break;
118 118
         }
Please login to merge, or discard this patch.
web/lib/admin/PageDecoration.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
         $retval = "<div class='sidebar'><p>";
74 74
 
75 75
         if ($advancedControls) {
76
-            $retval .= "<strong>" . _("You are:") . "</strong> ".$_SESSION['name']
76
+            $retval .= "<strong>"._("You are:")."</strong> ".$_SESSION['name']
77 77
             ."<br/>
78 78
               <br/>
79
-              <a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_user.php'>" . _("Go to your Profile page") . "</a> 
80
-              <a href='" . \core\CAT::getRootUrlPath() . "/admin/inc/logout.php'>" . _("Logout") . "</a> ";
79
+              <a href='" . \core\CAT::getRootUrlPath()."/admin/overview_user.php'>"._("Go to your Profile page")."</a> 
80
+              <a href='" . \core\CAT::getRootUrlPath()."/admin/inc/logout.php'>"._("Logout")."</a> ";
81 81
         }
82
-        $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/'>" . _("Start page") . "</a>
82
+        $retval .= "<a href='".\core\CAT::getRootUrlPath()."/'>"._("Start page")."</a>
83 83
             </p>
84 84
         </div> <!-- sidebar -->";
85 85
         \core\common\Entity::outOfThePotatoes();
@@ -103,23 +103,23 @@  discard block
 block discarded – undo
103 103
                     <h1>$cap1</h1>
104 104
                 </div><!--header_captions-->
105 105
                 <div id='langselection' style='padding-top:20px; padding-".$this->start.":10px;'>
106
-                    <form action='$place' method='GET' accept-charset='UTF-8'>" . _("View this page in") . "&nbsp;
106
+                    <form action='$place' method='GET' accept-charset='UTF-8'>"._("View this page in")."&nbsp;
107 107
                         <select id='lang' name='lang' onchange='this.form.submit()'>";
108 108
 
109 109
         foreach (\config\Master::LANGUAGES as $lang => $getValue) {
110
-            $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $getValue['display'] . "</option> ";
110
+            $retval .= "<option value='$lang' ".(strtoupper($language) == strtoupper($lang) ? "selected" : "")." >".$getValue['display']."</option> ";
111 111
         }
112 112
         $retval .= "</select>";
113 113
 
114 114
         foreach ($_GET as $getVar => $getValue) {
115 115
             $filterValue = filter_input(INPUT_GET, $getVar, FILTER_SANITIZE_STRING);
116 116
             if ($getVar != "lang" && $getValue != "") {
117
-                $retval .= "<input type='hidden' name='" . htmlspecialchars($getVar) . "' value='" . htmlspecialchars($filterValue) . "'>";
117
+                $retval .= "<input type='hidden' name='".htmlspecialchars($getVar)."' value='".htmlspecialchars($filterValue)."'>";
118 118
             }
119 119
         }
120 120
         $retval .= "</form>
121 121
                 </div><!--langselection-->";
122
-        $logoUrl = \core\CAT::getRootUrlPath() . "/resources/images/consortium_logo.png";
122
+        $logoUrl = \core\CAT::getRootUrlPath()."/resources/images/consortium_logo.png";
123 123
         $retval .= "<div class='consortium_logo'>
124 124
                     <img id='test_locate' src='$logoUrl' alt='Consortium Logo'>
125 125
                 </div> <!-- consortium_logo -->
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
         if (isset(\config\Master::APPEARANCE['MOTD']) && \config\Master::APPEARANCE['MOTD'] != "") {
214 214
             $retval .= "<div id='header_MOTD' style='display:inline-block; padding-".$this->start.":20px;vertical-align:top;'>
215
-              <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD'] . "</p>
215
+              <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD']."</p>
216 216
               </div><!--header_MOTD-->";
217 217
         }
218 218
         $retval .= $this->sidebar($advancedControls);
@@ -238,9 +238,9 @@  discard block
 block discarded – undo
238 238
           <html xmlns='http://www.w3.org/1999/xhtml' lang='$ourlocale'".($this->langObject->rtl ? "dir='rtl'" : "").">
239 239
           <head lang='$ourlocale'>
240 240
           <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
241
-        $cssUrl = \core\CAT::getRootUrlPath() . "/resources/css/cat.css.php";
241
+        $cssUrl = \core\CAT::getRootUrlPath()."/resources/css/cat.css.php";
242 242
         $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />";
243
-        $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>";
243
+        $retval .= "<title>".htmlspecialchars($pagetitle)."</title>";
244 244
         return $retval;
245 245
     }
246 246
 
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             // we may need to jump up one dir if we are either in admin/ or accountstatus/
255 255
             // (accountstatus courtesy of my good mood. It's userspace not admin space so
256 256
             // it shouldn't be using this function any more.)
257
-            $logoBase = \core\CAT::getRootUrlPath() . "/resources/images";
257
+            $logoBase = \core\CAT::getRootUrlPath()."/resources/images";
258 258
             return "<span id='logos'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/>
259 259
               <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
260 260
               <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>";
@@ -276,9 +276,9 @@  discard block
 block discarded – undo
276 276
             <table style='width:100%'>
277 277
                 <tr>
278 278
                     <td style='padding-".$this->start.":20px; padding-".$this->end.":20px; text-align:".$this->start."; vertical-align:top;'>
279
-                        " . $cat->catCopyright . "</td>";
279
+                        " . $cat->catCopyright."</td>";
280 280
         if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) {
281
-            $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>";
281
+            $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name'])."</a></td>";
282 282
         }
283 283
         $retval .= "            <td style='padding-".$this->start.":80px; padding-".$this->end.":20px; text-align:".$this->end."; vertical-align:top;'>";
284 284
 
Please login to merge, or discard this patch.
core/SilverbulletCertificate.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
         $invitationObject = new SilverbulletInvitation($token);
326 326
         $profile = new ProfileSilverbullet($invitationObject->profile);
327 327
         $inst = new IdP($profile->institution);
328
-        $loggerInstance->debug(5, "tokenStatus: done, got " . $invitationObject->invitationTokenStatus . ", " . $invitationObject->profile . ", " . $invitationObject->userId . ", " . $invitationObject->expiry . ", " . $invitationObject->invitationTokenString . "\n");
328
+        $loggerInstance->debug(5, "tokenStatus: done, got ".$invitationObject->invitationTokenStatus.", ".$invitationObject->profile.", ".$invitationObject->userId.", ".$invitationObject->expiry.", ".$invitationObject->invitationTokenString."\n");
329 329
         if ($invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_VALID && $invitationObject->invitationTokenStatus != SilverbulletInvitation::SB_TOKENSTATUS_PARTIALLY_REDEEMED) {
330 330
             throw new Exception("Attempt to generate a SilverBullet installer with an invalid/redeemed/expired token. The user should never have got that far!");
331 331
         }
@@ -338,12 +338,12 @@  discard block
 block discarded – undo
338 338
             throw new Exception("Despite a valid token, the corresponding user was not found in database or database query error!");
339 339
         }
340 340
         $expiryObject = mysqli_fetch_object(/** @scrutinizer ignore-type */ $userrow);
341
-        $loggerInstance->debug(5, "EXP: " . $expiryObject->expiry . "\n");
341
+        $loggerInstance->debug(5, "EXP: ".$expiryObject->expiry."\n");
342 342
         $expiryDateObject = date_create_from_format("Y-m-d H:i:s", $expiryObject->expiry);
343 343
         if ($expiryDateObject === FALSE) {
344 344
             throw new Exception("The expiry date we got from the DB is bogus!");
345 345
         }
346
-        $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s") . "\n");
346
+        $loggerInstance->debug(5, $expiryDateObject->format("Y-m-d H:i:s")."\n");
347 347
         // date_create with no parameters can't fail, i.e. is never FALSE
348 348
         $validity = date_diff(/** @scrutinizer ignore-type */ date_create(), $expiryDateObject);
349 349
         $expiryDays = $validity->days + 1;
@@ -377,14 +377,14 @@  discard block
 block discarded – undo
377 377
         $exportedCertClear = "";
378 378
         openssl_pkcs12_export($cert, $exportedCertClear, $privateKey, "", ['extracerts' => [$issuingCaPem, $rootCaPem]]);
379 379
         $pkey_3des = "";
380
-        openssl_pkey_export($privateKey, $pkey_3des, $importPassword, [ "encrypt_key_cipher" => OPENSSL_CIPHER_3DES ]);
380
+        openssl_pkey_export($privateKey, $pkey_3des, $importPassword, ["encrypt_key_cipher" => OPENSSL_CIPHER_3DES]);
381 381
         // store resulting cert CN and expiry date in separate columns into DB - do not store the cert data itself as it contains the private key!
382 382
         // we need the *real* expiry date, not just the day-approximation
383 383
         $x509 = new \core\common\X509();
384 384
         $certString = "";
385 385
         openssl_x509_export($cert, $certString);
386 386
         $parsedCert = $x509->processCertificate($certString);
387
-        $loggerInstance->debug(5, "CERTINFO: " . /** @scrutinizer ignore-type */ print_r($parsedCert['full_details'], true));
387
+        $loggerInstance->debug(5, "CERTINFO: "./** @scrutinizer ignore-type */ print_r($parsedCert['full_details'], true));
388 388
         $realExpiryDate = date_create_from_format("U", $parsedCert['full_details']['validTo_time_t'])->format("Y-m-d H:i:s");
389 389
 
390 390
         // store new cert info in DB
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         // let the RADIUS users know the actual username for CUI generation
397 397
         $radiusDbs = DBConnection::handle("RADIUS"); // is an array of server conns
398 398
         foreach ($radiusDbs as $oneRadiusDb) {
399
-            $oneRadiusDb->exec("INSERT IGNORE INTO radcheck (username, attribute, op, value) VALUES (?, 'CUI-Source-Username', ':=', ?)", "ss", ($profile->getUserById($invitationObject->userId))[$invitationObject->userId] , $csr["USERNAME"]);
399
+            $oneRadiusDb->exec("INSERT IGNORE INTO radcheck (username, attribute, op, value) VALUES (?, 'CUI-Source-Username', ':=', ?)", "ss", ($profile->getUserById($invitationObject->userId))[$invitationObject->userId], $csr["USERNAME"]);
400 400
         }
401 401
 
402 402
 // return PKCS#12 data stream
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
         $username = "";
454 454
         while ($usernameIsUnique === FALSE) {
455 455
             $usernameLocalPart = common\Entity::randomString(64 - 1 - strlen($realm), "0123456789abcdefghijklmnopqrstuvwxyz");
456
-            $username = $usernameLocalPart . "@" . $realm;
456
+            $username = $usernameLocalPart."@".$realm;
457 457
             $uniquenessQuery = $databaseHandle->exec("SELECT cn from silverbullet_certificate WHERE cn = ? AND ca_type = ?", "ss", $username, $certtype);
458 458
             // SELECT -> resource, not boolean
459 459
             if (mysqli_num_rows(/** @scrutinizer ignore-type */ $uniquenessQuery) == 0) {
Please login to merge, or discard this patch.
core/ExternalEduroamDBData.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             return $this->counter;
127 127
         }
128 128
 
129
-        $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised");
129
+        $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised");
130 130
         if ($cachedNumber !== FALSE) {
131 131
             $numberData = unserialize($cachedNumber);
132 132
             $now = new \DateTime();
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         } else { // data in cache is too old or doesn't exist. We really need to ask the database
140 140
             $list = $this->listAllServiceProviders();
141 141
             $this->counter = count($list);
142
-            file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()]));
142
+            file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()]));
143 143
             return $this->counter;
144 144
         }
145 145
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $returnarray = [];
189 189
         $query = "SELECT id_institution AS id, country, inst_realm as realmlist, name AS collapsed_name, contact AS collapsed_contact, type FROM view_active_institution WHERE country = ?";
190 190
         if ($eduroamDbType !== NULL) {
191
-            $query .= " AND ( type = '" . ExternalEduroamDBData::TYPE_IDPSP . "' OR type = '" . $eduroamDbType . "')";
191
+            $query .= " AND ( type = '".ExternalEduroamDBData::TYPE_IDPSP."' OR type = '".$eduroamDbType."')";
192 192
         }
193 193
         $externals = $this->db->exec($query, "s", $tld);
194 194
         // was a SELECT query, so a resource and not a boolean
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         $instServerTransaction = $this->db->exec($query, "s", $tld);
292 292
         while ($instServerResponses = mysqli_fetch_object(/** @scrutinizer ignore-type */ $instServerTransaction)) {
293 293
             $contactList = $this->dissectCollapsedContacts($instServerResponses->contacts);
294
-            $retval[$instServerResponses->ROid . "-". $instServerResponses->instid] = [
294
+            $retval[$instServerResponses->ROid."-".$instServerResponses->instid] = [
295 295
                 "names" => $this->splitNames($instServerResponses->inst_name),
296 296
                 "type" => array_search($instServerResponses->type, self::TYPE_MAPPING),
297 297
                 "servers" => $instServerResponses->servers,
Please login to merge, or discard this patch.
core/CertificationAuthorityEduPkiServer.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
     #private const EDUPKI_RA_PKEY_PASSPHRASE = "...";
27 27
 
28 28
     
29
-    private const LOCATION_RA_CERT = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem";
30
-    private const LOCATION_RA_KEY = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey";
31
-    private const LOCATION_WEBROOT = ROOT . "/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
29
+    private const LOCATION_RA_CERT = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem";
30
+    private const LOCATION_RA_KEY = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey";
31
+    private const LOCATION_WEBROOT = ROOT."/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
32 32
     private const EDUPKI_RA_ID = 700;
33 33
     private const EDUPKI_CERT_PROFILE_BOTH = "Radius Server SOAP";
34 34
     private const EDUPKI_CERT_PROFILE_IDP = "Radius Server SOAP";
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
         parent::__construct();
47 47
 
48 48
         if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_CERT) === FALSE) {
49
-            throw new Exception("RA operator PEM file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT);
49
+            throw new Exception("RA operator PEM file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT);
50 50
         }
51 51
         if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_KEY) === FALSE) {
52
-            throw new Exception("RA operator private key file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY);
52
+            throw new Exception("RA operator private key file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY);
53 53
         }
54 54
         if (stat(CertificationAuthorityEduPkiServer::LOCATION_WEBROOT) === FALSE) {
55
-            throw new Exception("CA website root CA file not found: " . CertificationAuthorityEduPkiServer::LOCATION_WEBROOT);
55
+            throw new Exception("CA website root CA file not found: ".CertificationAuthorityEduPkiServer::LOCATION_WEBROOT);
56 56
         }
57 57
     }
58 58
 
@@ -119,22 +119,22 @@  discard block
 block discarded – undo
119 119
                 throw new Exception("Unexpected policies requested.");
120 120
             }
121 121
             $altArray = [# Array mit den Subject Alternative Names
122
-                "email:" . $csr["USERMAIL"]
122
+                "email:".$csr["USERMAIL"]
123 123
             ];
124 124
             foreach ($csr["ALTNAMES"] as $oneAltName) {
125
-                $altArray[] = "DNS:" . $oneAltName;
125
+                $altArray[] = "DNS:".$oneAltName;
126 126
             }
127 127
             $soapPub = $this->initEduPKISoapSession("PUBLIC");
128 128
             $this->loggerInstance->debug(5, "FIRST ACTUAL SOAP REQUEST (Public, newRequest)!\n");
129
-            $this->loggerInstance->debug(5, "PARAM_1: " . CertificationAuthorityEduPkiServer::EDUPKI_RA_ID . "\n");
130
-            $this->loggerInstance->debug(5, "PARAM_2: " . $csr["CSR_STRING"] . "\n");
129
+            $this->loggerInstance->debug(5, "PARAM_1: ".CertificationAuthorityEduPkiServer::EDUPKI_RA_ID."\n");
130
+            $this->loggerInstance->debug(5, "PARAM_2: ".$csr["CSR_STRING"]."\n");
131 131
             $this->loggerInstance->debug(5, "PARAM_3: ");
132 132
             $this->loggerInstance->debug(5, $altArray);
133
-            $this->loggerInstance->debug(5, "PARAM_4: " . $profile . "\n");
134
-            $this->loggerInstance->debug(5, "PARAM_5: " . sha1("notused") . "\n");
135
-            $this->loggerInstance->debug(5, "PARAM_6: " . $csr["USERNAME"] . "\n");
136
-            $this->loggerInstance->debug(5, "PARAM_7: " . $csr["USERMAIL"] . "\n");
137
-            $this->loggerInstance->debug(5, "PARAM_8: " . ProfileSilverbullet::PRODUCTNAME . "\n");
133
+            $this->loggerInstance->debug(5, "PARAM_4: ".$profile."\n");
134
+            $this->loggerInstance->debug(5, "PARAM_5: ".sha1("notused")."\n");
135
+            $this->loggerInstance->debug(5, "PARAM_6: ".$csr["USERNAME"]."\n");
136
+            $this->loggerInstance->debug(5, "PARAM_7: ".$csr["USERMAIL"]."\n");
137
+            $this->loggerInstance->debug(5, "PARAM_8: ".ProfileSilverbullet::PRODUCTNAME."\n");
138 138
             $this->loggerInstance->debug(5, "PARAM_9: false\n");
139 139
             $soapNewRequest = $soapPub->newRequest(
140 140
                     CertificationAuthorityEduPkiServer::EDUPKI_RA_ID, # RA-ID
@@ -156,11 +156,11 @@  discard block
 block discarded – undo
156 156
         } catch (Exception $e) {
157 157
             // PHP 7.1 can do this much better
158 158
             if (is_soap_fault($e)) {
159
-                throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}:  {
159
+                throw new Exception("Error when sending SOAP request: "."{$e->faultcode}:  {
160 160
                     $e->faultstring
161 161
                 }\n");
162 162
             }
163
-            throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage());
163
+            throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage());
164 164
         }
165 165
         try {
166 166
             $soap = $this->initEduPKISoapSession("RA");
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file
195 195
             // rather than just using the string. Grr.
196 196
             $tempdir = \core\common\Entity::createTemporaryDirectory("test");
197
-            file_put_contents($tempdir['dir'] . "/content.txt", $soapCleartext);
197
+            file_put_contents($tempdir['dir']."/content.txt", $soapCleartext);
198 198
             // retrieve our RA cert from filesystem                    
199 199
             // the RA certificates are not needed right now because we
200 200
             // have resorted to S/MIME signatures with openssl command-line
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             // sign the data, using cmdline because openssl_pkcs7_sign produces strange results
207 207
             // -binary didn't help, nor switch -md to sha1 sha256 or sha512
208 208
             $this->loggerInstance->debug(5, "Actual content to be signed is this:\n  $soapCleartext\n");
209
-        $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem";
209
+        $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem";
210 210
             $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline:   $execCmd\n");
211 211
             $output = [];
212 212
             $return = 999;
@@ -215,21 +215,21 @@  discard block
 block discarded – undo
215 215
                 throw new Exception("Non-zero return value from openssl smime!");
216 216
             }
217 217
             // and get the signature blob back from the filesystem
218
-            $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt"));
218
+            $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt"));
219 219
             $this->loggerInstance->debug(5, "Request for server approveRequest has parameters:\n");
220
-            $this->loggerInstance->debug(5, $soapReqnum . "\n");
221
-            $this->loggerInstance->debug(5, $soapCleartext . "\n"); // PHP magically encodes this as base64 while sending!
222
-            $this->loggerInstance->debug(5, $detachedSig . "\n");
220
+            $this->loggerInstance->debug(5, $soapReqnum."\n");
221
+            $this->loggerInstance->debug(5, $soapCleartext."\n"); // PHP magically encodes this as base64 while sending!
222
+            $this->loggerInstance->debug(5, $detachedSig."\n");
223 223
             $soapIssueCert = $soap->approveRequest($soapReqnum, $soapCleartext, $detachedSig);
224
-            $this->loggerInstance->debug(5, "approveRequest Request was: \n" . $soap->__getLastRequest());
225
-            $this->loggerInstance->debug(5, "approveRequest Response was: \n" . $soap->__getLastResponse());
224
+            $this->loggerInstance->debug(5, "approveRequest Request was: \n".$soap->__getLastRequest());
225
+            $this->loggerInstance->debug(5, "approveRequest Response was: \n".$soap->__getLastResponse());
226 226
             if ($soapIssueCert === FALSE) {
227 227
                 throw new Exception("The locally approved request was NOT processed by the CA.");
228 228
             }
229 229
         } catch (SoapFault $e) {
230
-            throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
230
+            throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
231 231
         } catch (Exception $e) {
232
-            throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage());
232
+            throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage());
233 233
         }
234 234
         return $soapReqnum;
235 235
     }
@@ -281,9 +281,9 @@  discard block
 block discarded – undo
281 281
                 throw new Exception("CAInfo has no root certificate for us!");
282 282
             }
283 283
         } catch (SoapFault $e) {
284
-            throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
284
+            throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
285 285
         } catch (Exception $e) {
286
-            throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage());
286
+            throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage());
287 287
         }
288 288
         return [
289 289
             "CERT" => openssl_x509_read($parsedCert['pem']),
@@ -316,12 +316,12 @@  discard block
 block discarded – undo
316 316
             // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file
317 317
             // rather than just using the string. Grr.
318 318
             $tempdir = \core\common\Entity::createTemporaryDirectory("test");
319
-            file_put_contents($tempdir['dir'] . "/content.txt", $soapRawRevRequest);
319
+            file_put_contents($tempdir['dir']."/content.txt", $soapRawRevRequest);
320 320
             // retrieve our RA cert from filesystem
321 321
             // sign the data, using cmdline because openssl_pkcs7_sign produces strange results
322 322
             // -binary didn't help, nor switch -md to sha1 sha256 or sha512
323 323
             $this->loggerInstance->debug(5, "Actual content to be signed is this:\n$soapRawRevRequest\n");
324
-        $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY . " -signer " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT;
324
+        $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY." -signer ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT;
325 325
             $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n");
326 326
             $output = [];
327 327
             $return = 999;
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
                 throw new Exception("Non-zero return value from openssl smime!");
331 331
             }
332 332
             // and get the signature blob back from the filesystem
333
-            $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt"));
333
+            $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt"));
334 334
             $soapIssueRev = $soap->approveRevocationRequest($soapRevocationSerial, $soapRawRevRequest, $detachedSig);
335 335
             if ($soapIssueRev === FALSE) {
336 336
                 throw new Exception("The locally approved revocation request was NOT processed by the CA.");
@@ -338,9 +338,9 @@  discard block
 block discarded – undo
338 338
         } catch (Exception $e) {
339 339
             // PHP 7.1 can do this much better
340 340
             if (is_soap_fault($e)) {
341
-                throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: {$e->faultstring}\n");
341
+                throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: {$e->faultstring}\n");
342 342
             }
343
-            throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage());
343
+            throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage());
344 344
         }
345 345
     }
346 346
 
@@ -440,9 +440,9 @@  discard block
 block discarded – undo
440 440
      */
441 441
     public function soapToXmlInteger($x)
442 442
     {
443
-        return '<' . $x[0] . '>'
443
+        return '<'.$x[0].'>'
444 444
                 . htmlentities($x[1], ENT_NOQUOTES | ENT_XML1)
445
-                . '</' . $x[0] . '>';
445
+                . '</'.$x[0].'>';
446 446
     }
447 447
 
448 448
     /**
@@ -461,9 +461,9 @@  discard block
 block discarded – undo
461 461
         // dump private key into directory
462 462
         $outstring = "";
463 463
         openssl_pkey_export($privateKey, $outstring);
464
-        file_put_contents($tempdir . "/pkey.pem", $outstring);
464
+        file_put_contents($tempdir."/pkey.pem", $outstring);
465 465
         // PHP can only do one DC in the Subject. But we need three.
466
-        $execCmd = \config\Master::PATHS['openssl'] . " req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=" . \config\ConfAssistant::CONSORTIUM['name'] . "/OU=$fed/CN=$username/emailAddress=$username";
466
+        $execCmd = \config\Master::PATHS['openssl']." req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=".\config\ConfAssistant::CONSORTIUM['name']."/OU=$fed/CN=$username/emailAddress=$username";
467 467
         $this->loggerInstance->debug(2, "Calling openssl req with following cmdline: $execCmd\n");
468 468
         $output = [];
469 469
         $return = 999;
Please login to merge, or discard this patch.