Roundcube-AutoLogin
Roundcube-AutoLogin copied to clipboard
RoundCube 1.3.10 - lower case "set-cookie:" headers
RoundCube 1.3.10 changed their: Set-Cookie:
headers, to: set-cookie:
So this match fails: preg_match_all('/Set-Cookie: (.*)\b/', $response, $cookies);
Simply add the case-insensitive 'i' flag to it, to handle both cases: preg_match_all('/Set-Cookie: (.*)\b/i', $response, $cookies);
See also https://github.com/alexjeen/Roundcube-AutoLogin/pull/13
this simpel patch solve the situation for OLDER AND NEWER version of RC,using case-insensitive comparison:
@@ -70,7 +70,7 @@ public function login($email, $password)
if($response_info['http_code'] == 302)
{
// find all relevant cookies to set (php session + rc auth cookie)
- preg_match_all('/set-cookie: (.*)\b/', $response, $cookies);
+ preg_match_all('/set-cookie: (.*)\b/i', $response, $cookies);
$cookie_return = array();