1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22:22 -05:00

Caldav: need to check session on each request, credentials may have changed or session expired

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@770 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-10-07 19:58:29 +00:00
parent db4b9d5a94
commit cb1efbe973

View File

@ -155,18 +155,14 @@ public class CaldavConnection extends AbstractConnection {
sendUnauthorized();
} else {
decodeCredentials(headers.get("authorization"));
// authenticate only once, but check credentials
if (session == null || !session.checkCredentials(userName, password)) {
// need to check session on each request, credentials may have changed or session expired
try {
session = ExchangeSessionFactory.getInstance(userName, password);
handleRequest(command, path, headers, content);
} catch (DavMailAuthenticationException e) {
sendUnauthorized();
}
}
if (session != null) {
handleRequest(command, path, headers, content);
}
}
os.flush();
DavGatewayTray.resetIcon();