@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | ] |
21 | 21 | ], |
22 | 22 | 'legal_service_urls' => [ |
23 | - //Any service url string matching any of the following prefixes is accepted |
|
23 | + //Any service url string matching any of the following prefixes is accepted |
|
24 | 24 | 'http://host1.domain:1234/path1', |
25 | 25 | 'https://host2.domain:5678/path2/path3', |
26 | 26 | ], |
27 | 27 | |
28 | 28 | 'legal_target_service_urls' => [ |
29 | - //Any target service url string matching any of the following prefixes is accepted |
|
29 | + //Any target service url string matching any of the following prefixes is accepted |
|
30 | 30 | 'http://host3.domain:4321/path4', |
31 | 31 | 'https://host4.domain:8765/path5/path6', |
32 | 32 | // So is regex |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ], |
35 | 35 | |
36 | 36 | 'ticketstore' => [ |
37 | - //defaults to filesystem ticket store using the directory 'ticketcache' |
|
37 | + //defaults to filesystem ticket store using the directory 'ticketcache' |
|
38 | 38 | 'class' => 'casserver:FileSystemTicketStore', //Not intended for production |
39 | 39 | 'directory' => 'ticketcache', |
40 | 40 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | if (!$casconfig->getValue('enable_logout', false)) { |
30 | 30 | $message = 'Logout not allowed'; |
31 | 31 | |
32 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
32 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
33 | 33 | |
34 | 34 | throw new \Exception($message); |
35 | 35 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | if ($skipLogoutPage && !array_key_exists('url', $_GET)) { |
40 | 40 | $message = 'Required URL query parameter [url] not provided. (CAS Server)'; |
41 | 41 | |
42 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
42 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
43 | 43 | |
44 | 44 | throw new \Exception($message); |
45 | 45 | } |
@@ -186,7 +186,7 @@ |
||
186 | 186 | |
187 | 187 | \SimpleSAML\Utils\HTTP::redirectTrustedURL(\SimpleSAML\Utils\HTTP::addURLParameters($_GET['service'], $parameters)); |
188 | 188 | } else { |
189 | - \ SimpleSAML\Utils\HTTP::redirectTrustedURL( |
|
189 | + \ SimpleSAML\Utils\HTTP::redirectTrustedURL( |
|
190 | 190 | \SimpleSAML\Utils\HTTP::addURLParameters(SimpleSAML\Module::getModuleURL('casserver/loggedIn.php'), $parameters) |
191 | 191 | ); |
192 | 192 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | } |
31 | 31 | if (!ctype_alnum($legalUrl[0])) { |
32 | 32 | // Probably a regex. Suppress errors incase the format is invalid |
33 | - $result = @preg_match($legalUrl, $service); |
|
33 | + $result = @preg_match($legalUrl, $service); |
|
34 | 34 | if ($result === 1) { |
35 | 35 | return true; |
36 | 36 | } elseif ($result === false) { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $dsn = $storeConfig->getString('dsn'); |
53 | 53 | $username = $storeConfig->getString('username'); |
54 | 54 | $password = $storeConfig->getString('password'); |
55 | - $options = $storeConfig->getArray('options', []); |
|
55 | + $options = $storeConfig->getArray('options', []); |
|
56 | 56 | $this->prefix = $storeConfig->getString('prefix', ''); |
57 | 57 | |
58 | 58 | $this->pdo = new \PDO($dsn, $username, $password, $options); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | |
134 | 134 | while (($row = $fetchTableVersion->fetch(\PDO::FETCH_ASSOC)) !== false) { |
135 | - $this->tableVersions[$row['_name']] = (int)$row['_version']; |
|
135 | + $this->tableVersions[$row['_name']] = (int) $row['_version']; |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $insertQuery->execute($data); |
231 | 231 | return; |
232 | 232 | } catch (\PDOException $e) { |
233 | - $ecode = (string)$e->getCode(); |
|
233 | + $ecode = (string) $e->getCode(); |
|
234 | 234 | switch ($ecode) { |
235 | 235 | case '23505': /* PostgreSQL */ |
236 | 236 | break; |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | 'sessionId' => $serviceTicket['sessionId'] |
87 | 87 | ]); |
88 | 88 | try { |
89 | - \SimpleSAML\Utils\HTTP::fetch($pgtUrl . '?pgtIou=' . $proxyGrantingTicket['iou'] |
|
90 | - . '&pgtId=' . $proxyGrantingTicket['id']); |
|
89 | + \SimpleSAML\Utils\HTTP::fetch($pgtUrl.'?pgtIou='.$proxyGrantingTicket['iou'] |
|
90 | + . '&pgtId='.$proxyGrantingTicket['id']); |
|
91 | 91 | |
92 | 92 | $protocol->setProxyGrantingTicketIOU($proxyGrantingTicket['iou']); |
93 | 93 | |
@@ -100,29 +100,29 @@ discard block |
||
100 | 100 | echo $protocol->getValidateSuccessResponse($serviceTicket['userName']); |
101 | 101 | } else { |
102 | 102 | if ($ticketFactory->isExpired($serviceTicket)) { |
103 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' has expired'; |
|
103 | + $message = 'Ticket '.var_export($_GET['ticket'], true).' has expired'; |
|
104 | 104 | |
105 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
105 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
106 | 106 | |
107 | 107 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
108 | 108 | } else { |
109 | 109 | if (sanitize($serviceTicket['service']) != sanitize($_GET['service'])) { |
110 | 110 | $message = 'Mismatching service parameters: expected ' |
111 | 111 | . var_export($serviceTicket['service'], true) |
112 | - . ' but was: ' . var_export($_GET['service'], true); |
|
112 | + . ' but was: '.var_export($_GET['service'], true); |
|
113 | 113 | |
114 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
114 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
115 | 115 | |
116 | 116 | echo $protocol->getValidateFailureResponse('INVALID_SERVICE', $message); |
117 | 117 | } else { |
118 | 118 | if ($serviceTicket['forceAuthn'] != $forceAuthn) { |
119 | 119 | $message = 'Ticket was issue from single sign on session'; |
120 | 120 | |
121 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
121 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
122 | 122 | |
123 | 123 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
124 | 124 | } else { |
125 | - \SimpleSAML\Logger::error('casserver:' . $method . ': internal server error.'); |
|
125 | + \SimpleSAML\Logger::error('casserver:'.$method.': internal server error.'); |
|
126 | 126 | |
127 | 127 | echo $protocol->getValidateFailureResponse('INTERNAL_ERROR', 'Unknown internal error'); |
128 | 128 | } |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | } |
132 | 132 | } else { |
133 | 133 | if (is_null($serviceTicket)) { |
134 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' not recognized'; |
|
134 | + $message = 'Ticket '.var_export($_GET['ticket'], true).' not recognized'; |
|
135 | 135 | |
136 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
136 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
137 | 137 | |
138 | 138 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
139 | 139 | } else { |
@@ -143,16 +143,16 @@ discard block |
||
143 | 143 | * @psalm-suppress RedundantCondition |
144 | 144 | */ |
145 | 145 | if ($ticketFactory->isProxyTicket($serviceTicket) && ($method === 'serviceValidate')) { |
146 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) |
|
146 | + $message = 'Ticket '.var_export($_GET['ticket'], true) |
|
147 | 147 | . ' is a proxy ticket. Use proxyValidate instead.'; |
148 | 148 | |
149 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
149 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
150 | 150 | |
151 | 151 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
152 | 152 | } else { |
153 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' is not a service ticket'; |
|
153 | + $message = 'Ticket '.var_export($_GET['ticket'], true).' is not a service ticket'; |
|
154 | 154 | |
155 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
155 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
156 | 156 | |
157 | 157 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
158 | 158 | } |
@@ -169,13 +169,13 @@ discard block |
||
169 | 169 | if (!array_key_exists('service', $_GET)) { |
170 | 170 | $message = 'Missing service parameter: [service]'; |
171 | 171 | |
172 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
172 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
173 | 173 | |
174 | 174 | echo $protocol->getValidateFailureResponse('INVALID_REQUEST', $message); |
175 | 175 | } else { |
176 | 176 | $message = 'Missing ticket parameter: [ticket]'; |
177 | 177 | |
178 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
178 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
179 | 179 | |
180 | 180 | echo $protocol->getValidateFailureResponse('INVALID_REQUEST', $message); |
181 | 181 | } |