Skip to content
Snippets Groups Projects
Commit 7c4e9045 authored by Mads Freek Petersen's avatar Mads Freek Petersen
Browse files

Be more liberal ... now accepting an optional <cr> before the <lf> in answer...

Be more liberal ... now accepting an optional <cr> before the <lf> in answer from cas v.1 validate call.


git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@909 44740490-163a-0410-bde0-09ae8108e29a
parent 8e4e680c
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,7 @@ function casValidate($cas) { ...@@ -63,7 +63,7 @@ function casValidate($cas) {
if (isset($cas['validate'])) { # cas v1 yes|no\r<username> style if (isset($cas['validate'])) { # cas v1 yes|no\r<username> style
$paramPrefix = strpos($cas['validate'], '?') ? '&' : '?'; $paramPrefix = strpos($cas['validate'], '?') ? '&' : '?';
$result = file_get_contents($cas['validate'] . $paramPrefix . 'ticket=' . $ticket . '&service=' . urlencode($service) ); $result = file_get_contents($cas['validate'] . $paramPrefix . 'ticket=' . $ticket . '&service=' . urlencode($service) );
$res = preg_split("/\n/",$result); $res = preg_split("/\r?\n/",$result);
if (strcmp($res[0], "yes") == 0) { if (strcmp($res[0], "yes") == 0) {
return array($res[1], array()); return array($res[1], array());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment