Skip to content

Commit 6b42564

Browse files
authored
support both old and new RoundCubes
see alexjeen#13 and alexjeen#11 (comment)
1 parent a8ad35e commit 6b42564

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

RoundcubeAutoLogin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ public function login($email, $password)
7272
if($response_info['http_code'] == 302)
7373
{
7474
// find all relevant cookies to set (php session + rc auth cookie)
75-
preg_match_all('/Set-Cookie: (.*)\b/', $response, $cookies);
75+
// newer RoundCubes use set-cookie, older use Set-Cookie
76+
preg_match_all('/Set-Cookie: (.*)\b/i', $response, $cookies);
7677

7778
$cookie_return = array();
7879

0 commit comments

Comments
 (0)