@@ -36,5 +36,5 @@ |
||
36 | 36 | $this->includeAtTemplateBase('includes/footer.php'); |
37 | 37 | |
38 | 38 | if (isset($this->data['autofocus'])) { |
39 | - echo '<script type="text/javascript">window.onload = function() {document.getElementById(\'' . $this->data['autofocus'] . '\').focus();}</script>'; |
|
39 | + echo '<script type="text/javascript">window.onload = function() {document.getElementById(\''.$this->data['autofocus'].'\').focus();}</script>'; |
|
40 | 40 | } |
41 | 41 | \ No newline at end of file |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | <?php |
35 | 35 | if (isset($this->data['url'])) { |
36 | - echo('<p><a href="' . $this->data["url"] . '">' . $this->t('{casserver:casserver:continue_heading}') . '</a>'); |
|
36 | + echo('<p><a href="'.$this->data["url"].'">'.$this->t('{casserver:casserver:continue_heading}').'</a>'); |
|
37 | 37 | } |
38 | 38 | ?> |
39 | 39 | |
@@ -42,5 +42,5 @@ discard block |
||
42 | 42 | $this->includeAtTemplateBase('includes/footer.php'); |
43 | 43 | |
44 | 44 | if (isset($this->data['autofocus'])) { |
45 | - echo '<script type="text/javascript">window.onload = function() {document.getElementById(\'' . $this->data['autofocus'] . '\').focus();}</script>'; |
|
45 | + echo '<script type="text/javascript">window.onload = function() {document.getElementById(\''.$this->data['autofocus'].'\').focus();}</script>'; |
|
46 | 46 | } |
47 | 47 | \ No newline at end of file |
@@ -12,8 +12,8 @@ |
||
12 | 12 | IdPs listed by the disco service will be restricted to entityIDs in the specified set. */ |
13 | 13 | 'scopes' => array('mobile' => array('https://idp1.domain:1234/saml2/idp/metadata.php', |
14 | 14 | 'https://idp2.domain:5678/saml2/idp/metadata.php'), |
15 | - 'desktop' => array('https://idp3.domain:1234/saml2/idp/metadata.php', |
|
16 | - 'https://idp4.domain:5678/saml2/idp/metadata.php')), |
|
15 | + 'desktop' => array('https://idp3.domain:1234/saml2/idp/metadata.php', |
|
16 | + 'https://idp4.domain:5678/saml2/idp/metadata.php')), |
|
17 | 17 | |
18 | 18 | 'legal_service_urls' => array( //Any service url string matching any of the following prefixes is accepted |
19 | 19 | 'http://host1.domain:1234/path1', |
@@ -63,42 +63,42 @@ |
||
63 | 63 | |
64 | 64 | echo $protocol->getProxySuccessResponse($proxyTicket['id']); |
65 | 65 | } else { |
66 | - $message = 'Ticket ' . var_export($_GET['pgt'], true) . ' has expired'; |
|
66 | + $message = 'Ticket '.var_export($_GET['pgt'], true).' has expired'; |
|
67 | 67 | |
68 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
68 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
69 | 69 | |
70 | 70 | echo $protocol->getProxyFailureResponse('BAD_PGT', $message); |
71 | 71 | } |
72 | 72 | } elseif (!$ticketFactory->isProxyGrantingTicket($proxyGrantingTicket)) { |
73 | - $message = 'Not a valid proxy granting ticket id: ' . var_export($_GET['pgt'], true); |
|
73 | + $message = 'Not a valid proxy granting ticket id: '.var_export($_GET['pgt'], true); |
|
74 | 74 | |
75 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
75 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
76 | 76 | |
77 | 77 | echo $protocol->getProxyFailureResponse('BAD_PGT', $message); |
78 | 78 | } else { |
79 | - $message = 'Ticket ' . var_export($_GET['pgt'], true) . ' not recognized'; |
|
79 | + $message = 'Ticket '.var_export($_GET['pgt'], true).' not recognized'; |
|
80 | 80 | |
81 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
81 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
82 | 82 | |
83 | 83 | echo $protocol->getProxyFailureResponse('BAD_PGT', $message); |
84 | 84 | } |
85 | 85 | } elseif (!array_key_exists('targetService', $_GET)) { |
86 | 86 | $message = 'Missing target service parameter [targetService]'; |
87 | 87 | |
88 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
88 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
89 | 89 | |
90 | 90 | echo $protocol->getProxyFailureResponse('INVALID_REQUEST', $message); |
91 | 91 | } elseif (!checkServiceURL(sanitize($_GET['targetService']), $legal_target_service_urls)) { |
92 | 92 | $message = 'Target service parameter not listed as a legal service: [targetService] = ' |
93 | 93 | . var_export($_GET['targetService'], true); |
94 | 94 | |
95 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
95 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
96 | 96 | |
97 | 97 | echo $protocol->getProxyFailureResponse('INVALID_REQUEST', $message); |
98 | 98 | } else { |
99 | 99 | $message = 'Missing proxy granting ticket parameter: [pgt]'; |
100 | 100 | |
101 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
101 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
102 | 102 | |
103 | 103 | echo $protocol->getProxyFailureResponse('INVALID_REQUEST', $message); |
104 | 104 | } |
@@ -68,34 +68,34 @@ discard block |
||
68 | 68 | echo $protocol->getValidateFailureResponse(); |
69 | 69 | } else { |
70 | 70 | if ($ticketFactory->isExpired($serviceTicket)) { |
71 | - $message = 'Ticket has ' . var_export($_GET['ticket'], true) . ' expired'; |
|
71 | + $message = 'Ticket has '.var_export($_GET['ticket'], true).' expired'; |
|
72 | 72 | } else { |
73 | 73 | if (sanitize($serviceTicket['service']) == sanitize($_GET['service'])) { |
74 | 74 | $message = 'Mismatching service parameters: expected ' |
75 | 75 | . var_export($serviceTicket['service'], true) |
76 | - . ' but was: ' . var_export($_GET['service'], true); |
|
76 | + . ' but was: '.var_export($_GET['service'], true); |
|
77 | 77 | } else { |
78 | 78 | $message = 'Ticket was issue from single sign on session'; |
79 | 79 | } |
80 | 80 | } |
81 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
81 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
82 | 82 | |
83 | 83 | echo $protocol->getValidateFailureResponse(); |
84 | 84 | } |
85 | 85 | } |
86 | 86 | } else { |
87 | 87 | if (is_null($serviceTicket)) { |
88 | - $message = 'ticket: ' . var_export($_GET['ticket'], true) . ' not recognized'; |
|
88 | + $message = 'ticket: '.var_export($_GET['ticket'], true).' not recognized'; |
|
89 | 89 | } else { |
90 | - $message = 'ticket: ' . var_export($_GET['ticket'], true) . ' is not a service ticket'; |
|
90 | + $message = 'ticket: '.var_export($_GET['ticket'], true).' is not a service ticket'; |
|
91 | 91 | } |
92 | 92 | |
93 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
93 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
94 | 94 | |
95 | 95 | echo $protocol->getValidateFailureResponse(); |
96 | 96 | } |
97 | 97 | } catch (Exception $e) { |
98 | - SimpleSAML_Logger::error('casserver:validate: internal server error. ' . var_export($e->getMessage(), true)); |
|
98 | + SimpleSAML_Logger::error('casserver:validate: internal server error. '.var_export($e->getMessage(), true)); |
|
99 | 99 | |
100 | 100 | echo $protocol->getValidateFailureResponse(); |
101 | 101 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $message = 'Missing ticket parameter: [ticket]'; |
107 | 107 | } |
108 | 108 | |
109 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
109 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
110 | 110 | |
111 | 111 | echo $protocol->getValidateFailureResponse(); |
112 | 112 | } |
@@ -39,9 +39,9 @@ |
||
39 | 39 | if (!isset($validFunctions[$function])) { |
40 | 40 | $message = 'Not a valid function for cas.php.'; |
41 | 41 | |
42 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
42 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
43 | 43 | |
44 | 44 | throw new Exception($message); |
45 | 45 | } |
46 | 46 | |
47 | -include(dirname(__FILE__) . '/' . $validFunctions[$function] . '.php'); |
|
47 | +include(dirname(__FILE__).'/'.$validFunctions[$function].'.php'); |
@@ -78,8 +78,8 @@ discard block |
||
78 | 78 | 'sessionId' => $serviceTicket['sessionId'] |
79 | 79 | )); |
80 | 80 | try { |
81 | - SimpleSAML\Utils\HTTP::fetch($pgtUrl . '?pgtIou=' . $proxyGrantingTicket['iou'] |
|
82 | - . '&pgtId=' . $proxyGrantingTicket['id']); |
|
81 | + SimpleSAML\Utils\HTTP::fetch($pgtUrl.'?pgtIou='.$proxyGrantingTicket['iou'] |
|
82 | + . '&pgtId='.$proxyGrantingTicket['id']); |
|
83 | 83 | |
84 | 84 | $protocol->setProxyGrantingTicketIOU($proxyGrantingTicket['iou']); |
85 | 85 | |
@@ -92,29 +92,29 @@ discard block |
||
92 | 92 | echo $protocol->getValidateSuccessResponse($serviceTicket['userName']); |
93 | 93 | } else { |
94 | 94 | if ($ticketFactory->isExpired($serviceTicket)) { |
95 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' has expired'; |
|
95 | + $message = 'Ticket '.var_export($_GET['ticket'], true).' has expired'; |
|
96 | 96 | |
97 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
97 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
98 | 98 | |
99 | 99 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
100 | 100 | } else { |
101 | 101 | if (sanitize($serviceTicket['service']) != sanitize($_GET['service'])) { |
102 | 102 | $message = 'Mismatching service parameters: expected ' |
103 | 103 | . var_export($serviceTicket['service'], true) |
104 | - . ' but was: ' . var_export($_GET['service'], true); |
|
104 | + . ' but was: '.var_export($_GET['service'], true); |
|
105 | 105 | |
106 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
106 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
107 | 107 | |
108 | 108 | echo $protocol->getValidateFailureResponse('INVALID_SERVICE', $message); |
109 | 109 | } else { |
110 | 110 | if ($serviceTicket['forceAuthn'] != $forceAuthn) { |
111 | 111 | $message = 'Ticket was issue from single sign on session'; |
112 | 112 | |
113 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
113 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
114 | 114 | |
115 | 115 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
116 | 116 | } else { |
117 | - SimpleSAML_Logger::error('casserver:' . $method . ': internal server error.'); |
|
117 | + SimpleSAML_Logger::error('casserver:'.$method.': internal server error.'); |
|
118 | 118 | |
119 | 119 | echo $protocol->getValidateFailureResponse('INTERNAL_ERROR', 'Unknown internal error'); |
120 | 120 | } |
@@ -123,23 +123,23 @@ discard block |
||
123 | 123 | } |
124 | 124 | } else { |
125 | 125 | if (is_null($serviceTicket)) { |
126 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' not recognized'; |
|
126 | + $message = 'Ticket '.var_export($_GET['ticket'], true).' not recognized'; |
|
127 | 127 | |
128 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
128 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
129 | 129 | |
130 | 130 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
131 | 131 | } else { |
132 | 132 | if ($ticketFactory->isProxyTicket($serviceTicket) && $method == 'serviceValidate') { |
133 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) |
|
133 | + $message = 'Ticket '.var_export($_GET['ticket'], true) |
|
134 | 134 | . ' is a proxy ticket. Use proxyValidate instead.'; |
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 { |
140 | - $message = 'Ticket ' . var_export($_GET['ticket'], true) . ' is not a service ticket'; |
|
140 | + $message = 'Ticket '.var_export($_GET['ticket'], true).' is not a service ticket'; |
|
141 | 141 | |
142 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
142 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
143 | 143 | |
144 | 144 | echo $protocol->getValidateFailureResponse('INVALID_TICKET', $message); |
145 | 145 | } |
@@ -156,13 +156,13 @@ discard block |
||
156 | 156 | if (!array_key_exists('service', $_GET)) { |
157 | 157 | $message = 'Missing service parameter: [service]'; |
158 | 158 | |
159 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
159 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
160 | 160 | |
161 | 161 | echo $protocol->getValidateFailureResponse('INVALID_REQUEST', $message); |
162 | 162 | } else { |
163 | 163 | $message = 'Missing ticket parameter: [ticket]'; |
164 | 164 | |
165 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
165 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
166 | 166 | |
167 | 167 | echo $protocol->getValidateFailureResponse('INVALID_REQUEST', $message); |
168 | 168 | } |
@@ -29,11 +29,11 @@ |
||
29 | 29 | } |
30 | 30 | if (!ctype_alnum($legalUrl[0])) { |
31 | 31 | // Probably a regex. Suppress errors incase the format is invalid |
32 | - $result = @preg_match($legalUrl, $service); |
|
32 | + $result = @preg_match($legalUrl, $service); |
|
33 | 33 | if ($result === 1) { |
34 | 34 | return true; |
35 | 35 | } elseif ($result === false) { |
36 | - SimpleSAML_Logger::warning("Invalid CAS legal service url '$legalUrl'. Error " . preg_last_error()); |
|
36 | + SimpleSAML_Logger::warning("Invalid CAS legal service url '$legalUrl'. Error ".preg_last_error()); |
|
37 | 37 | } |
38 | 38 | } elseif (strpos($service, $legalUrl) === 0) { |
39 | 39 | return true; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | if (!$casconfig->getValue('enable_logout', false)) { |
29 | 29 | $message = 'Logout not allowed'; |
30 | 30 | |
31 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
31 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
32 | 32 | |
33 | 33 | throw new Exception($message); |
34 | 34 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | if ($skipLogoutPage && !array_key_exists('url', $_GET)) { |
39 | 39 | $message = 'Required URL query parameter [url] not provided. (CAS Server)'; |
40 | 40 | |
41 | - SimpleSAML_Logger::debug('casserver:' . $message); |
|
41 | + SimpleSAML_Logger::debug('casserver:'.$message); |
|
42 | 42 | |
43 | 43 | throw new Exception($message); |
44 | 44 | } |