diff --git a/api/src/Vfs/Base.php b/api/src/Vfs/Base.php index d33fb2de8e..df037b8f8c 100644 --- a/api/src/Vfs/Base.php +++ b/api/src/Vfs/Base.php @@ -86,10 +86,10 @@ class Base if ($check_url === true || !isset($check_url) && strpos($url, '$') === false) { $check_url = strtr($url, [ - 'user' => $GLOBALS['egw_info']['user']['account_lid'], - 'pass' => urlencode($GLOBALS['egw_info']['user']['passwd']), - 'host' => $GLOBALS['egw_info']['user']['domain'], - 'home' => str_replace(array('\\\\', '\\'), array('', '/'), $GLOBALS['egw_info']['user']['homedirectory']), + '$user' => $GLOBALS['egw_info']['user']['account_lid'], + '$pass' => urlencode($GLOBALS['egw_info']['user']['passwd']), + '$host' => $GLOBALS['egw_info']['user']['domain'], + '$home' => str_replace(array('\\\\', '\\'), array('', '/'), $GLOBALS['egw_info']['user']['homedirectory']), ]); } diff --git a/filemanager/inc/class.filemanager_admin.inc.php b/filemanager/inc/class.filemanager_admin.inc.php index f66baf8ccb..a554c67653 100644 --- a/filemanager/inc/class.filemanager_admin.inc.php +++ b/filemanager/inc/class.filemanager_admin.inc.php @@ -154,9 +154,9 @@ class filemanager_admin extends filemanager_ui throw new Api\Exception\NoPermission(); } $url = $content['mounts']['url']['scheme'] . '://'; - if (in_array($content['mounts']['url']['scheme'], ['smb', 'webdavs', 'vfs'])) + if (in_array($content['mounts']['url']['scheme'], ['smb', 'vfs']) || !empty(trim($content['mounts']['url']['user']))) { - if (empty(trim($content['mounts']['url']['user']))) + if (in_array($content['mounts']['url']['scheme'], ['smb', 'vfs']) && empty(trim($content['mounts']['url']['user']))) { throw new Api\Exception\WrongUserinput(lang('SMB, WebDAVs and VFS require a username!')); }