mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
"one more client without session support"
This commit is contained in:
parent
0d60e6f245
commit
3953386cc7
13
groupdav.php
13
groupdav.php
@ -29,14 +29,21 @@ function check_access(&$account)
|
||||
'passwd_type' => 'text',
|
||||
);
|
||||
// no session for clients known to NOT use it (no cookie support)
|
||||
$no_session = strpos($_SERVER['HTTP_USER_AGENT'],'DAVKit') !== false; // Apple iCal
|
||||
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
foreach(array(
|
||||
'davkit', // Apple iCal
|
||||
'bionicmessage.net',
|
||||
) as $test)
|
||||
{
|
||||
if (($no_session = strpos($agent,$test) !== false)) break;
|
||||
}
|
||||
//error_log("GroupDAV PHP_AUTH_USER={$_SERVER['PHP_AUTH_USER']}, HTTP_USER_AGENT={$_SERVER['HTTP_USER_AGENT']} --> no_session=".(int)$no_session);
|
||||
|
||||
if (!($sessionid = $GLOBALS['egw']->session->create($account,'','',$no_session)))
|
||||
{
|
||||
header('WWW-Authenticate: Basic realm="'.groupdav::REALM.'"');
|
||||
header("HTTP/1.1 401 Unauthorized");
|
||||
header("X-WebDAV-Status: 401 Unauthorized", true);
|
||||
header('HTTP/1.1 401 Unauthorized');
|
||||
header('X-WebDAV-Status: 401 Unauthorized', true);
|
||||
exit;
|
||||
}
|
||||
return $sessionid;
|
||||
|
Loading…
Reference in New Issue
Block a user