mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
untested fallback-auth GET parameter implementation (base64 encoded "username:password")
This commit is contained in:
parent
4bd33fc609
commit
2740632bdb
@ -295,6 +295,16 @@ class Base
|
||||
'host' => $GLOBALS['egw_info']['user']['domain'],
|
||||
'home' => str_replace(array('\\\\', '\\'), array('', '/'), $GLOBALS['egw_info']['user']['homedirectory'] ?? ''),
|
||||
);
|
||||
// check if we have a (base64 encoded) fallback-auth GET parameter and need to use it
|
||||
if (empty($GLOBALS['egw_info']['user']['passwd']) && strpos(($query=Vfs::parse_url($_path, PHP_URL_QUERY)), 'fallback-auth=') !== false)
|
||||
{
|
||||
parse_str($query, $query_params);
|
||||
if (!empty($query_params['fallback-auth']) && ($raw = base64_decode($query_params['fallback-auth'])) && strpos($raw, ':') !== false)
|
||||
{
|
||||
list($defaults['user'], $defaults['pass']) = explode(':', $raw, 2);
|
||||
$defaults['pass'] = urlencode($defaults['pass']);
|
||||
}
|
||||
}
|
||||
$parts = array_merge(Vfs::parse_url($_path), Vfs::parse_url($path) ?: [], $defaults);
|
||||
if(!$parts['host'])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user