From 7c4e9045edd751582d28a3f1d215f352912dc3a9 Mon Sep 17 00:00:00 2001 From: Mads Freek Petersen <freek@wayf.dk> Date: Thu, 2 Oct 2008 13:25:38 +0000 Subject: [PATCH] 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 --- www/auth/login-cas-ldap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/auth/login-cas-ldap.php b/www/auth/login-cas-ldap.php index dd36db4ba..727a44870 100755 --- a/www/auth/login-cas-ldap.php +++ b/www/auth/login-cas-ldap.php @@ -63,7 +63,7 @@ function casValidate($cas) { if (isset($cas['validate'])) { # cas v1 yes|no\r<username> style $paramPrefix = strpos($cas['validate'], '?') ? '&' : '?'; $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) { return array($res[1], array()); -- GitLab