Test Setup Failed
Pull Request — master (#318)
by Dimitri
26:56
created
web/skins/msp/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     print "vendorlogo ='';\n";
50 50
 }
51 51
 
52
-print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE] . '";';
52
+print 'downloadMessage = "'.$Gui->textTemplates->templates[\web\lib\user\DOWNLOAD_MESSAGE].'";';
53 53
 //TODO modify this based on OS detection
54 54
 $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? "";
55 55
 if (preg_match('/Android/', $userAgent)) {
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     <?php echo $divs->divHeading($visibility); ?>
80 80
     <div id="main_page">
81 81
         <div id="loading_ico">
82
-          <?php echo _("Authenticating") . "..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/>
82
+          <?php echo _("Authenticating")."..." ?><br><img src="<?php echo $Gui->skinObject->findResourceUrl("IMAGES", "icons/loading51.gif"); ?>" alt="Authenticating ..."/>
83 83
         </div>
84 84
         <div id="info_overlay"> <!-- device info -->
85 85
             <div id="info_window"></div>
Please login to merge, or discard this patch.
web/skins/msp/Divs.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function divSilverbullet() {
68 68
         $retval = "
69 69
 <div id='silverbullet'>"
70
-    . $this->Gui->textTemplates->templates[user\SB_GO_AWAY] . 
70
+    . $this->Gui->textTemplates->templates[user\SB_GO_AWAY]. 
71 71
     "</div>
72 72
     ";
73 73
         return $retval;
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
     public function divProfiles() {
110 110
         return "
111 111
 <div id='profiles'> <!-- this is the profile selection filled during run time -->
112
-    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION] . "
112
+    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION]."
113 113
     </div>" .
114
-"<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" .
114
+"<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>".
115 115
                 "</div>";
116 116
     }
117 117
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     public function divInstitution($selectButton = TRUE) {
127 127
         $retval = "<div id='institution_name'>
128 128
     <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" .
129
-                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">" . $this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION] . "</a>" : "") .
129
+                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "").
130 130
                 "</div>";
131 131
         $retval .= $this->emptyImage('idp_logo', 'IdP Logo');
132 132
         return $retval;
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     public function divOtherinstallers() {
141 141
         $retval = "
142 142
 <div class='sub_h'>
143
-    <div id='other_installers'>".$this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "
143
+    <div id='other_installers'>".$this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."
144 144
          <table id='device_list' style='padding:0px;'>";
145 145
 
146 146
         foreach ($this->Gui->listDevices(isset($_REQUEST['hidden']) ? $_REQUEST['hidden'] : 0) as $group => $deviceGroup) {
@@ -148,18 +148,18 @@  discard block
 block discarded – undo
148 148
             $deviceIndex = 0;
149 149
 
150 150
             $imgTag = "";
151
-            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $group . ".png");
151
+            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$group.".png");
152 152
             if ($imgLocation !== FALSE) {
153
-                $imgTag = '<img src="' . $imgLocation . '" alt="' . $group . ' Device" title="' . $group . ' Device">';
153
+                $imgTag = '<img src="'.$imgLocation.'" alt="'.$group.' Device" title="'.$group.' Device">';
154 154
             }
155
-            $retval .= '<tbody><tr><td class="vendor" rowspan="' . $groupIndex . '">' . $imgTag . '</td>';
155
+            $retval .= '<tbody><tr><td class="vendor" rowspan="'.$groupIndex.'">'.$imgTag.'</td>';
156 156
             foreach ($deviceGroup as $d => $D) {
157 157
                 if ($deviceIndex) {
158 158
                     $retval .= '<tr>';
159 159
                 }
160
-                $retval .= "<td><button id='" . $d . "'>" . $D['display'] . "</button>"
161
-                        . "<div class='device_info' id='info_" . $d . "'></div></td>"
162
-                        . "<td><button class='more_info_b' id='info_b_" . $d . "'>i</button></td></tr>\n";
160
+                $retval .= "<td><button id='".$d."'>".$D['display']."</button>"
161
+                        . "<div class='device_info' id='info_".$d."'></div></td>"
162
+                        . "<td><button class='more_info_b' id='info_b_".$d."'>i</button></td></tr>\n";
163 163
                 $deviceIndex++;
164 164
             }
165 165
             $retval .= "</tbody>";
@@ -172,15 +172,15 @@  discard block
 block discarded – undo
172 172
     }
173 173
 
174 174
     public function divGuessOs($operatingSystem) {
175
-        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $operatingSystem['group'] . ".png");
175
+        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$operatingSystem['group'].".png");
176 176
         $vendorstyle = "";
177 177
         if ($vendorlogo !== FALSE) {
178
-            $vendorstyle = "style='background-image:url(\"" . $vendorlogo . "\")'";
178
+            $vendorstyle = "style='background-image:url(\"".$vendorlogo."\")'";
179 179
         }
180 180
         $deleteIcon = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/delete_32.png");
181 181
         $deleteImg = "";
182 182
         if ($deleteIcon !== FALSE) {
183
-            $deleteImg = "<img id='cross_icon_" . $operatingSystem['device'] . "' src='$deleteIcon' >";
183
+            $deleteImg = "<img id='cross_icon_".$operatingSystem['device']."' src='$deleteIcon' >";
184 184
         }
185 185
         return "
186 186
 <div class='sub_h' id='guess_os'>
@@ -188,23 +188,23 @@  discard block
 block discarded – undo
188 188
     <table id='browser'>
189 189
         <tr>
190 190
             <td>
191
-                <button class='large_button guess_os' $vendorstyle id='g_" . $operatingSystem['device'] . "'>
191
+                <button class='large_button guess_os' $vendorstyle id='g_".$operatingSystem['device']."'>
192 192
                     $deleteImg
193
-                    <div class='download_button_text_1' id='download_button_header_" . $operatingSystem['device'] . "'> " . $this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE] . "
193
+                    <div class='download_button_text_1' id='download_button_header_".$operatingSystem['device']."'> ".$this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE]."
194 194
                     </div>
195 195
                     <div class='download_button_text'>" .
196
-                $operatingSystem['display'] . "
196
+                $operatingSystem['display']."
197 197
                     </div>
198 198
                 </button>
199
-                <div class='device_info' id='info_g_" . $operatingSystem['device'] . "'></div>
199
+                <div class='device_info' id='info_g_" . $operatingSystem['device']."'></div>
200 200
           </td>
201 201
           <td style='vertical-align:top'>
202
-               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device'] . "'>i</button>
202
+               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device']."'>i</button>
203 203
           </td>
204 204
       </tr>
205 205
     </table> <!-- id='browser' -->
206 206
     <div class='sub_h'>
207
-       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "</a>
207
+       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."</a>
208 208
     </div>
209 209
 </div> <!-- id='guess_os' -->";
210 210
     }
Please login to merge, or discard this patch.
web/skins/msp/user/cat_info.php 1 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/skins/msp/resources/css/cat-user.css.php 1 patch
Spacing   +3 added lines, -3 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
 header("Content-Type:text/css");
22
-require dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))) . "/config/_config.php";
22
+require dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))."/config/_config.php";
23 23
 $langInstance = new core\common\Language();
24 24
 $start = $langInstance->rtl ? "right" : "left";
25 25
 $end = $langInstance->rtl ? "left" : "right";
@@ -399,8 +399,8 @@  discard block
 block discarded – undo
399 399
 
400 400
 #message_only {
401 401
     padding-top: 20px;
402
-    padding-<?php echo $start;?>: 30px;
403
-    padding-<?php echo $end;?>: 30px;
402
+    padding-<?php echo $start; ?>: 30px;
403
+    padding-<?php echo $end; ?>: 30px;
404 404
     font-weight: normal;
405 405
     position: relative;
406 406
     font-size: 15px;
Please login to merge, or discard this patch.
utils/update_monitor_copy_2.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * in a separate way and it is crucial that the updates are porformed more often (hourly)
28 28
  */
29 29
 namespace utils;
30
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
30
+require_once dirname(dirname(__FILE__))."/config/_config.php";
31 31
 
32 32
 setlocale(LC_CTYPE, "en_US.UTF-8");
33 33
 
@@ -52,4 +52,4 @@  discard block
 block discarded – undo
52 52
 
53 53
 $timeEnd = microtime(true);
54 54
 $timeElapsed = $timeEnd - $timeStart;
55
-printf("Whole update done in %.2fs\n",$timeElapsed);
56 55
\ No newline at end of file
56
+printf("Whole update done in %.2fs\n", $timeElapsed);
57 57
\ No newline at end of file
Please login to merge, or discard this patch.
utils/UpdateFromMonitor.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * update the local copy
25 25
  */
26 26
 namespace utils;
27
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
27
+require_once dirname(dirname(__FILE__))."/config/_config.php";
28 28
 
29 29
 setlocale(LC_CTYPE, "en_US.UTF-8");
30 30
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $this->db_ext->query("SET NAMES 'utf8'");
99 99
         $this->db_local->query("SET NAMES 'utf8mb4'");
100 100
         $result = $this->db_ext->query("SELECT * FROM $table");
101
-        $queryFields = implode(',', array_column($this->fields[$db][$table_name],0));
101
+        $queryFields = implode(',', array_column($this->fields[$db][$table_name], 0));
102 102
         while ($row = $result->fetch_assoc()) {
103 103
             $v = [];
104 104
             foreach ($this->fields[$db][$table_name] as $field) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                     }
117 117
                 }
118 118
             }
119
-            $queryValues = implode(',',$v);
119
+            $queryValues = implode(',', $v);
120 120
             $query = "INSERT INTO $tmpTable (".$queryFields.") VALUES (".$queryValues.")";
121 121
             $this->db_local->query($query);
122 122
         }
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
             $realms = explode(',', $row[1]);
135 135
             foreach ($contacts as $contact) {
136 136
                 foreach ($realms as $realm) {
137
-                    $email = empty($contact['mail']) ? 'NULL' :'"'.$contact['mail'].'"';
138
-                    $name = empty($contact['name']) ? 'NULL' :'"'.$contact['name'].'"';
139
-                    $phone = empty($contact['phone']) ? 'NULL' :'"'.$contact['phone'].'"';
137
+                    $email = empty($contact['mail']) ? 'NULL' : '"'.$contact['mail'].'"';
138
+                    $name = empty($contact['name']) ? 'NULL' : '"'.$contact['name'].'"';
139
+                    $phone = empty($contact['phone']) ? 'NULL' : '"'.$contact['phone'].'"';
140 140
                     $id = '"'.$row[2].'"';
141 141
                     $ROid = '"'.$row[3].'"';
142 142
                     $query = "INSERT INTO tmp_institution_admins (name, email, phone, inst_realm, instid, ROid)"
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
     }
162 162
 
163 163
     private function escape($inp) {
164
-        $out=str_replace('\\','\\\\',$inp);
165
-        $out=str_replace('"','\"',$out);
166
-        $out=str_replace('?','\?',$out);
164
+        $out = str_replace('\\', '\\\\', $inp);
165
+        $out = str_replace('"', '\"', $out);
166
+        $out = str_replace('?', '\?', $out);
167 167
         $out = 'convert(cast(convert("'.$out.'" using latin1) as binary) using utf8)';
168 168
         return($out);
169 169
     }
Please login to merge, or discard this patch.
config/autoloader.php 1 patch
Spacing   +6 added lines, -6 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,12 +30,12 @@  discard block
 block discarded – undo
30 30
 
31 31
 // register the base directories for the namespace prefix
32 32
 // include configuration
33
-$loader->addNamespace('config', __DIR__ );
33
+$loader->addNamespace('config', __DIR__);
34 34
 // include CAT/core library
35
-$loader->addNamespace('core', __DIR__ . "/../core");
35
+$loader->addNamespace('core', __DIR__."/../core");
36 36
 // include CAT/devices library
37
-$loader->addNamespace('devices', __DIR__ . "/../devices");
37
+$loader->addNamespace('devices', __DIR__."/../devices");
38 38
 // include CAT/web library
39
-$loader->addNamespace('web', __DIR__ . "/../web");
39
+$loader->addNamespace('web', __DIR__."/../web");
40 40
 // include CAT/utils
41
-$loader->addNamespace('utils', __DIR__ . "/../utils");
41
+$loader->addNamespace('utils', __DIR__."/../utils");
Please login to merge, or discard this patch.
docker/MSP/web/html/lib.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
 function cat_socket($obj) {
7 7
    $sock = socket_create(AF_UNIX, SOCK_STREAM, 0);
8 8
    $conn = socket_connect($sock, SOCKET);
9
-   if ( $conn ) {
10
-     socket_write ($sock, $obj, strlen($obj));
11
-     $out = socket_read ($sock, 2048);
9
+   if ($conn) {
10
+     socket_write($sock, $obj, strlen($obj));
11
+     $out = socket_read($sock, 2048);
12 12
      return $out;
13 13
    }
14 14
    return 'FAILURE';
Please login to merge, or discard this patch.
core/CertificationAuthorityEduPkiServer.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
     public function __construct()
36 36
     {
37 37
             
38
-        if ( \config\ConfAssistant::eduPKI['testing'] === true ) {
39
-            $this->locationRaCert = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem";
40
-            $this->locationRaKey = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey";
41
-            $this->locationWebRoot = ROOT . "/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
38
+        if (\config\ConfAssistant::eduPKI['testing'] === true) {
39
+            $this->locationRaCert = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem";
40
+            $this->locationRaKey = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey";
41
+            $this->locationWebRoot = ROOT."/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
42 42
             $this->eduPkiRaId = 700;
43 43
             $this->eduPkiCertProfileBoth = "Radius Server SOAP";
44 44
             $this->eduPkiCertProfileIdp = "Radius Server SOAP";
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
             $this->eduPkiEndpointPublic = "https://pki.edupki.org/edupki-test-ca/cgi-bin/pub/soap?wsdl=1";
48 48
             $this->eduPkiEndpointRa = "https://ra.edupki.org/edupki-test-ca/cgi-bin/ra/soap?wsdl=1";
49 49
         } else {
50
-            $this->locationRaCert = ROOT . "/config/SilverbulletClientCerts/edupki-prod-ra.pem";
51
-            $this->locationRaKey = ROOT . "/config/SilverbulletClientCerts/edupki-prod-ra.clearkey";
52
-            $this->locationWebRoot = ROOT . "/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
50
+            $this->locationRaCert = ROOT."/config/SilverbulletClientCerts/edupki-prod-ra.pem";
51
+            $this->locationRaKey = ROOT."/config/SilverbulletClientCerts/edupki-prod-ra.clearkey";
52
+            $this->locationWebRoot = ROOT."/config/SilverbulletClientCerts/eduPKI-webserver-root.pem";
53 53
             $this->eduPkiRaId = 100;
54 54
             $this->eduPkiCertProfileBoth = "eduroam IdP and SP";
55 55
             $this->eduPkiCertProfileIdp = "eduroam IdP";
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
         parent::__construct();
64 64
 
65 65
         if (stat($this->locationRaCert) === FALSE) {
66
-            throw new Exception("RA operator PEM file not found: " . $this->locationRaCert);
66
+            throw new Exception("RA operator PEM file not found: ".$this->locationRaCert);
67 67
         }
68 68
         if (stat($this->locationRaKey) === FALSE) {
69
-            throw new Exception("RA operator private key file not found: " . $this->locationRaKey);
69
+            throw new Exception("RA operator private key file not found: ".$this->locationRaKey);
70 70
         }
71 71
         if (stat($this->locationWebRoot) === FALSE) {
72
-            throw new Exception("CA website root CA file not found: " . $this->locationWebRoot);
72
+            throw new Exception("CA website root CA file not found: ".$this->locationWebRoot);
73 73
         }
74 74
     }
75 75
 
@@ -136,26 +136,26 @@  discard block
 block discarded – undo
136 136
                 throw new Exception("Unexpected policies requested.");
137 137
             }
138 138
             $altArray = [# Array mit den Subject Alternative Names
139
-                "email:" . $csr["USERMAIL"]
139
+                "email:".$csr["USERMAIL"]
140 140
             ];
141 141
             foreach ($csr["ALTNAMES"] as $oneAltName) {
142 142
                 if (!empty($oneAltName) && preg_match('/(?=^.{1,254}$)(^(?:(?!\d|-)[a-z0-9\-]{1,63}(?<!-)\.)+(?:[a-z]{2,})$)/i', $oneAltName) > 0) {
143
-                    $altArray[] = "DNS:" . $oneAltName;
143
+                    $altArray[] = "DNS:".$oneAltName;
144 144
                 } else {
145
-                    $altArray[] = "IP:" . $oneAltName;
145
+                    $altArray[] = "IP:".$oneAltName;
146 146
                 }
147 147
             }
148 148
             $soapPub = $this->initEduPKISoapSession("PUBLIC");
149 149
             $this->loggerInstance->debug(5, "FIRST ACTUAL SOAP REQUEST (Public, newRequest)!\n");
150
-            $this->loggerInstance->debug(5, "PARAM_1: " . $this->eduPkiRaId . "\n");
151
-            $this->loggerInstance->debug(5, "PARAM_2: " . $csr["CSR_STRING"] . "\n");
150
+            $this->loggerInstance->debug(5, "PARAM_1: ".$this->eduPkiRaId."\n");
151
+            $this->loggerInstance->debug(5, "PARAM_2: ".$csr["CSR_STRING"]."\n");
152 152
             $this->loggerInstance->debug(5, "PARAM_3: ");
153 153
             $this->loggerInstance->debug(5, $altArray);
154
-            $this->loggerInstance->debug(5, "PARAM_4: " . $profile . "\n");
155
-            $this->loggerInstance->debug(5, "PARAM_5: " . sha1("notused") . "\n");
156
-            $this->loggerInstance->debug(5, "PARAM_6: " . $csr["USERNAME"] . "\n");
157
-            $this->loggerInstance->debug(5, "PARAM_7: " . $csr["USERMAIL"] . "\n");
158
-            $this->loggerInstance->debug(5, "PARAM_8: " . ProfileSilverbullet::PRODUCTNAME . "\n");
154
+            $this->loggerInstance->debug(5, "PARAM_4: ".$profile."\n");
155
+            $this->loggerInstance->debug(5, "PARAM_5: ".sha1("notused")."\n");
156
+            $this->loggerInstance->debug(5, "PARAM_6: ".$csr["USERNAME"]."\n");
157
+            $this->loggerInstance->debug(5, "PARAM_7: ".$csr["USERMAIL"]."\n");
158
+            $this->loggerInstance->debug(5, "PARAM_8: ".ProfileSilverbullet::PRODUCTNAME."\n");
159 159
             $this->loggerInstance->debug(5, "PARAM_9: false\n");
160 160
             
161 161
             $soapNewRequest = $soapPub->newRequest(
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                 #}\n");
186 186
                 return 0;
187 187
             }
188
-            throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage());
188
+            throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage());
189 189
         }
190 190
         try {
191 191
             $soap = $this->initEduPKISoapSession("RA");
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file
218 218
             // rather than just using the string. Grr.
219 219
             $tempdir = \core\common\Entity::createTemporaryDirectory("test");
220
-            file_put_contents($tempdir['dir'] . "/content.txt", $soapCleartext);
220
+            file_put_contents($tempdir['dir']."/content.txt", $soapCleartext);
221 221
             // retrieve our RA cert from filesystem                    
222 222
             // the RA certificates are not needed right now because we
223 223
             // have resorted to S/MIME signatures with openssl command-line
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             // sign the data, using cmdline because openssl_pkcs7_sign produces strange results
230 230
             // -binary didn't help, nor switch -md to sha1 sha256 or sha512
231 231
             $this->loggerInstance->debug(2, "Actual content to be signed is this:\n  $soapCleartext\n");
232
-            $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . $this->locationRaKey . " -signer " . $this->locationRaCert;
232
+            $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".$this->locationRaKey." -signer ".$this->locationRaCert;
233 233
             $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline:   $execCmd\n");
234 234
             $output = [];
235 235
             $return = 999;
@@ -238,21 +238,21 @@  discard block
 block discarded – undo
238 238
                 throw new Exception("Non-zero return value from openssl smime!");
239 239
             }
240 240
             // and get the signature blob back from the filesystem
241
-            $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt"));
241
+            $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt"));
242 242
             $this->loggerInstance->debug(5, "Request for server approveRequest has parameters:\n");
243
-            $this->loggerInstance->debug(5, $soapReqnum . "\n");
244
-            $this->loggerInstance->debug(5, $soapCleartext . "\n"); // PHP magically encodes this as base64 while sending!
245
-            $this->loggerInstance->debug(5, $detachedSig . "\n");
243
+            $this->loggerInstance->debug(5, $soapReqnum."\n");
244
+            $this->loggerInstance->debug(5, $soapCleartext."\n"); // PHP magically encodes this as base64 while sending!
245
+            $this->loggerInstance->debug(5, $detachedSig."\n");
246 246
             $soapIssueCert = $soap->approveRequest($soapReqnum, $soapCleartext, $detachedSig);
247
-            $this->loggerInstance->debug(5, "approveRequest Request was: \n" . $soap->__getLastRequest());
248
-            $this->loggerInstance->debug(5, "approveRequest Response was: \n" . $soap->__getLastResponse());
247
+            $this->loggerInstance->debug(5, "approveRequest Request was: \n".$soap->__getLastRequest());
248
+            $this->loggerInstance->debug(5, "approveRequest Response was: \n".$soap->__getLastResponse());
249 249
             if ($soapIssueCert === FALSE) {
250 250
                 throw new Exception("The locally approved request was NOT processed by the CA.");
251 251
             }
252 252
         } catch (SoapFault $e) {
253
-            throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
253
+            throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
254 254
         } catch (Exception $e) {
255
-            throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage());
255
+            throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage());
256 256
         }
257 257
         return $soapReqnum;
258 258
     }
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
                 throw new Exception("CAInfo has no root certificate for us!");
305 305
             }
306 306
         } catch (SoapFault $e) {
307
-            throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
307
+            throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n");
308 308
         } catch (Exception $e) {
309
-            throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage());
309
+            throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage());
310 310
         }
311 311
         return [
312 312
             "CERT" => openssl_x509_read($parsedCert['pem']),
@@ -339,12 +339,12 @@  discard block
 block discarded – undo
339 339
             // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file
340 340
             // rather than just using the string. Grr.
341 341
             $tempdir = \core\common\Entity::createTemporaryDirectory("test");
342
-            file_put_contents($tempdir['dir'] . "/content.txt", $soapRawRevRequest);
342
+            file_put_contents($tempdir['dir']."/content.txt", $soapRawRevRequest);
343 343
             // retrieve our RA cert from filesystem
344 344
             // sign the data, using cmdline because openssl_pkcs7_sign produces strange results
345 345
             // -binary didn't help, nor switch -md to sha1 sha256 or sha512
346 346
             $this->loggerInstance->debug(5, "Actual content to be signed is this:\n$soapRawRevRequest\n");
347
-        $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . $this->locationRaKey . " -signer " . $this->locationRaCert;
347
+        $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".$this->locationRaKey." -signer ".$this->locationRaCert;
348 348
             $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n");
349 349
             $output = [];
350 350
             $return = 999;
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
                 throw new Exception("Non-zero return value from openssl smime!");
354 354
             }
355 355
             // and get the signature blob back from the filesystem
356
-            $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt"));
356
+            $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt"));
357 357
             $soapIssueRev = $soap->approveRevocationRequest($soapRevocationSerial, $soapRawRevRequest, $detachedSig);
358 358
             if ($soapIssueRev === FALSE) {
359 359
                 throw new Exception("The locally approved revocation request was NOT processed by the CA.");
@@ -361,9 +361,9 @@  discard block
 block discarded – undo
361 361
         } catch (Exception $e) {
362 362
             // PHP 7.1 can do this much better
363 363
             if (is_soap_fault($e)) {
364
-                throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: {$e->faultstring}\n");
364
+                throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: {$e->faultstring}\n");
365 365
             }
366
-            throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage());
366
+            throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage());
367 367
         }
368 368
     }
369 369
 
@@ -465,9 +465,9 @@  discard block
 block discarded – undo
465 465
      */
466 466
     public function soapToXmlInteger($x)
467 467
     {
468
-        return '<' . $x[0] . '>'
468
+        return '<'.$x[0].'>'
469 469
                 . htmlentities($x[1], ENT_NOQUOTES | ENT_XML1)
470
-                . '</' . $x[0] . '>';
470
+                . '</'.$x[0].'>';
471 471
     }
472 472
 
473 473
     /**
@@ -486,9 +486,9 @@  discard block
 block discarded – undo
486 486
         // dump private key into directory
487 487
         $outstring = "";
488 488
         openssl_pkey_export($privateKey, $outstring);
489
-        file_put_contents($tempdir . "/pkey.pem", $outstring);
489
+        file_put_contents($tempdir."/pkey.pem", $outstring);
490 490
         // PHP can only do one DC in the Subject. But we need three.
491
-        $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";
491
+        $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";
492 492
         $this->loggerInstance->debug(2, "Calling openssl req with following cmdline: $execCmd\n");
493 493
         $output = [];
494 494
         $return = 999;
Please login to merge, or discard this patch.