@@ -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; |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | 'sessionId' => $serviceTicket['sessionId'] |
83 | 83 | ]); |
84 | 84 | try { |
85 | - \SimpleSAML\Utils\HTTP::fetch($pgtUrl . '?pgtIou=' . $proxyGrantingTicket['iou'] |
|
86 | - . '&pgtId=' . $proxyGrantingTicket['id']); |
|
85 | + \SimpleSAML\Utils\HTTP::fetch($pgtUrl.'?pgtIou='.$proxyGrantingTicket['iou'] |
|
86 | + . '&pgtId='.$proxyGrantingTicket['id']); |
|
87 | 87 | |
88 | 88 | $protocol->setProxyGrantingTicketIOU($proxyGrantingTicket['iou']); |
89 | 89 | |
@@ -96,29 +96,29 @@ discard block |
||
96 | 96 | echo $protocol->getValidateSuccessResponse($serviceTicket['userName']); |
97 | 97 | } else { |
98 | 98 | if ($ticketFactory->isExpired($serviceTicket)) { |
99 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' has expired'; |
|
99 | + $message = 'Ticket '.var_export($_GET['ticket'], true).' has expired'; |
|
100 | 100 | |
101 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
101 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
102 | 102 | |
103 | 103 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
104 | 104 | } else { |
105 | 105 | if (sanitize($serviceTicket['service']) != sanitize($_GET['service'])) { |
106 | 106 | $message = 'Mismatching service parameters: expected ' |
107 | 107 | . var_export($serviceTicket['service'], true) |
108 | - . ' but was: ' . var_export($_GET['service'], true); |
|
108 | + . ' but was: '.var_export($_GET['service'], true); |
|
109 | 109 | |
110 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
110 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
111 | 111 | |
112 | 112 | echo $protocol->getValidateFailureResponse('INVALID_SERVICE', $message); |
113 | 113 | } else { |
114 | 114 | if ($serviceTicket['forceAuthn'] != $forceAuthn) { |
115 | 115 | $message = 'Ticket was issue from single sign on session'; |
116 | 116 | |
117 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
117 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
118 | 118 | |
119 | 119 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
120 | 120 | } else { |
121 | - \SimpleSAML\Logger::error('casserver:' . $method . ': internal server error.'); |
|
121 | + \SimpleSAML\Logger::error('casserver:'.$method.': internal server error.'); |
|
122 | 122 | |
123 | 123 | echo $protocol->getValidateFailureResponse('INTERNAL_ERROR', 'Unknown internal error'); |
124 | 124 | } |
@@ -127,23 +127,23 @@ discard block |
||
127 | 127 | } |
128 | 128 | } else { |
129 | 129 | if (is_null($serviceTicket)) { |
130 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' not recognized'; |
|
130 | + $message = 'Ticket '.var_export($_GET['ticket'], true).' not recognized'; |
|
131 | 131 | |
132 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
132 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
133 | 133 | |
134 | 134 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
135 | 135 | } else { |
136 | 136 | if ($ticketFactory->isProxyTicket($serviceTicket) && ($method === 'serviceValidate')) { |
137 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) |
|
137 | + $message = 'Ticket '.var_export($_GET['ticket'], true) |
|
138 | 138 | . ' is a proxy ticket. Use proxyValidate instead.'; |
139 | 139 | |
140 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
140 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
141 | 141 | |
142 | 142 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
143 | 143 | } else { |
144 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' is not a service ticket'; |
|
144 | + $message = 'Ticket '.var_export($_GET['ticket'], true).' is not a service ticket'; |
|
145 | 145 | |
146 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
146 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
147 | 147 | |
148 | 148 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
149 | 149 | } |
@@ -160,13 +160,13 @@ discard block |
||
160 | 160 | if (!array_key_exists('service', $_GET)) { |
161 | 161 | $message = 'Missing service parameter: [service]'; |
162 | 162 | |
163 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
163 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
164 | 164 | |
165 | 165 | echo $protocol->getValidateFailureResponse('INVALID_REQUEST', $message); |
166 | 166 | } else { |
167 | 167 | $message = 'Missing ticket parameter: [ticket]'; |
168 | 168 | |
169 | - \SimpleSAML\Logger::debug('casserver:' . $message); |
|
169 | + \SimpleSAML\Logger::debug('casserver:'.$message); |
|
170 | 170 | |
171 | 171 | echo $protocol->getValidateFailureResponse('INVALID_REQUEST', $message); |
172 | 172 | } |