mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
using PATH_INFO as backend (HTTP_WebDAV_Server also only uses that
This commit is contained in:
parent
4bfa07a7b3
commit
45f22ee1b6
17
webdav.php
17
webdav.php
@ -32,26 +32,11 @@ function check_access(&$account)
|
||||
return egw_digest_auth::autocreate_session_callback($account);
|
||||
}
|
||||
|
||||
// if we are called with a /apps/$app path, use that $app as currentapp, to not require filemanager rights for the links
|
||||
$parts = explode('/',isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : $_SERVER['ORIG_PATH_INFO']);
|
||||
//error_log("webdav: explode".print_r($parts,true));
|
||||
if(count($parts) == 1)
|
||||
{
|
||||
error_log(__METHOD__. "Malformed Url: missing slash:\n".$_SERVER['SERVER_NAME']."\n PATH_INFO:".$_SERVER['PATH_INFO'].
|
||||
"\n REQUEST_URI".$_SERVER['REQUEST_URI']."\n ORIG_SCRIPT_NAME:".$_SERVER['ORIG_SCRIPT_NAME'].
|
||||
"\n REMOTE_ADDR:".$_SERVER['REMOTE_ADDR']."\n PATH_INFO:".$_SERVER['PATH_INFO']."\n HTTP_USER_AGENT:".$_SERVER['HTTP_USER_AGENT']) ;
|
||||
header("HTTP/1.1 501 Not implemented");
|
||||
header("X-WebDAV-Status: 501 Not implemented", true);
|
||||
exit;
|
||||
}
|
||||
|
||||
$app = count($parts) > 3 && $parts[1] == 'apps' ? $parts[2] : 'filemanager';
|
||||
|
||||
$GLOBALS['egw_info'] = array(
|
||||
'flags' => array(
|
||||
'disable_Template_class' => True,
|
||||
'noheader' => True,
|
||||
'currentapp' => $app,
|
||||
'currentapp' => preg_match('|/webdav.php/apps/([A-Za-z0-9_-]+)/|', $_SERVER['REQUEST_URI'], $matches) ? $matches[1] : 'filemanager',
|
||||
'autocreate_session_callback' => 'check_access',
|
||||
'no_exception_handler' => 'basic_auth', // we use a basic auth exception handler (sends exception message as basic auth realm)
|
||||
'auth_realm' => 'EGroupware WebDAV server', // cant use vfs_webdav_server::REALM as autoloading and include path not yet setup!
|
||||
|
Loading…
Reference in New Issue
Block a user