mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-02 17:28:07 -05:00
Fix authentication failure after session expiration
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2202 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
d25a2aa6cc
commit
1b22263e1e
@ -54,7 +54,7 @@ public final class ExchangeSessionFactory {
|
|||||||
|
|
||||||
PoolKey(String url, String userName, String password) {
|
PoolKey(String url, String userName, String password) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.userName = userName;
|
this.userName = convertUserName(userName);
|
||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ public final class ExchangeSessionFactory {
|
|||||||
String result = userName;
|
String result = userName;
|
||||||
// prepend default windows domain prefix
|
// prepend default windows domain prefix
|
||||||
String defaultDomain = Settings.getProperty("davmail.defaultDomain");
|
String defaultDomain = Settings.getProperty("davmail.defaultDomain");
|
||||||
if (userName.indexOf('\\') < 0 && defaultDomain != null) {
|
if (defaultDomain != null && userName.indexOf('\\') < 0 && userName.indexOf('@') < 0) {
|
||||||
result = defaultDomain + '\\' + userName;
|
result = defaultDomain + '\\' + userName;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -119,7 +119,7 @@ public final class ExchangeSessionFactory {
|
|||||||
ExchangeSession session = null;
|
ExchangeSession session = null;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
PoolKey poolKey = new PoolKey(baseUrl, convertUserName(userName), password);
|
PoolKey poolKey = new PoolKey(baseUrl, userName, password);
|
||||||
|
|
||||||
synchronized (LOCK) {
|
synchronized (LOCK) {
|
||||||
session = POOL_MAP.get(poolKey);
|
session = POOL_MAP.get(poolKey);
|
||||||
|
Loading…
Reference in New Issue
Block a user