Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F118412899
D755.1775804364.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D755.1775804364.diff
View Options
diff --git a/lib/Kolab/DAV/Auth/HTTPBasic.php b/lib/Kolab/DAV/Auth/HTTPBasic.php
--- a/lib/Kolab/DAV/Auth/HTTPBasic.php
+++ b/lib/Kolab/DAV/Auth/HTTPBasic.php
@@ -175,6 +175,7 @@
$storage = $rcube->get_storage();
$login_lc = $rcube->config->get('login_lc');
$default_port = $rcube->config->get('default_port', 143);
+ $username_domain = $rcube->config->get('username_domain');
// parse $host
$a_host = parse_url($host);
@@ -193,6 +194,24 @@
$port = $default_port;
}
+ // Check if we need to add/force domain to username
+ if (!empty($username_domain)) {
+ $domain = is_array($username_domain) ? $username_domain[$host] : $username_domain;
+
+ if ($domain = rcube_utils::parse_host((string)$domain, $host)) {
+ $pos = strpos($username, '@');
+
+ // force configured domains
+ if ($pos !== false && $rcube->config->get('username_domain_forced')) {
+ $username = substr($username, 0, $pos) . '@' . $domain;
+ }
+ // just add domain if not specified
+ else if ($pos === false) {
+ $username .= '@' . $domain;
+ }
+ }
+ }
+
// Convert username to lowercase. If storage backend
// is case-insensitive we need to store always the same username
if ($login_lc) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 6:59 AM (12 h, 58 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18809205
Default Alt Text
D755.1775804364.diff (1 KB)
Attached To
Mode
D755: Support shortlogins via the username_domain configuration option.
Attached
Detach File
Event Timeline