mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 11:42:23 -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:
parent
db4b9d5a94
commit
cb1efbe973
@ -155,18 +155,14 @@ public class CaldavConnection extends AbstractConnection {
|
|||||||
sendUnauthorized();
|
sendUnauthorized();
|
||||||
} else {
|
} else {
|
||||||
decodeCredentials(headers.get("authorization"));
|
decodeCredentials(headers.get("authorization"));
|
||||||
// authenticate only once, but check credentials
|
// need to check session on each request, credentials may have changed or session expired
|
||||||
if (session == null || !session.checkCredentials(userName, password)) {
|
|
||||||
try {
|
try {
|
||||||
session = ExchangeSessionFactory.getInstance(userName, password);
|
session = ExchangeSessionFactory.getInstance(userName, password);
|
||||||
|
handleRequest(command, path, headers, content);
|
||||||
} catch (DavMailAuthenticationException e) {
|
} catch (DavMailAuthenticationException e) {
|
||||||
sendUnauthorized();
|
sendUnauthorized();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (session != null) {
|
|
||||||
handleRequest(command, path, headers, content);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
os.flush();
|
os.flush();
|
||||||
DavGatewayTray.resetIcon();
|
DavGatewayTray.resetIcon();
|
||||||
|
Loading…
Reference in New Issue
Block a user