mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-05 10:47:59 -05:00
Fixes from audit
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@786 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
0197b4eaa7
commit
fd1719e10a
@ -142,7 +142,6 @@ public class ExchangeSession {
|
|||||||
private final HttpClient httpClient;
|
private final HttpClient httpClient;
|
||||||
|
|
||||||
private final String userName;
|
private final String userName;
|
||||||
private final String password;
|
|
||||||
|
|
||||||
private boolean disableGalLookup;
|
private boolean disableGalLookup;
|
||||||
private static final String YYYY_MM_DD_HH_MM_SS = "yyyy/MM/dd HH:mm:ss";
|
private static final String YYYY_MM_DD_HH_MM_SS = "yyyy/MM/dd HH:mm:ss";
|
||||||
@ -170,7 +169,6 @@ public class ExchangeSession {
|
|||||||
*/
|
*/
|
||||||
ExchangeSession(String url, String userName, String password) throws IOException {
|
ExchangeSession(String url, String userName, String password) throws IOException {
|
||||||
this.userName = userName;
|
this.userName = userName;
|
||||||
this.password = password;
|
|
||||||
try {
|
try {
|
||||||
boolean isBasicAuthentication = isBasicAuthentication(url);
|
boolean isBasicAuthentication = isBasicAuthentication(url);
|
||||||
|
|
||||||
@ -270,18 +268,6 @@ public class ExchangeSession {
|
|||||||
return isExpired;
|
return isExpired;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Compare credentials to current session credentials.
|
|
||||||
*
|
|
||||||
* @param userName user name
|
|
||||||
* @param password user password
|
|
||||||
* @return true if credentials match
|
|
||||||
*/
|
|
||||||
public boolean checkCredentials(String userName, String password) {
|
|
||||||
return userName != null && password != null
|
|
||||||
&& userName.equals(this.userName) && password.equals(this.password);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test authentication mode : form based or basic.
|
* Test authentication mode : form based or basic.
|
||||||
*
|
*
|
||||||
@ -1762,8 +1748,9 @@ public class ExchangeSession {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
for (File file : oldestFiles) {
|
for (File file : oldestFiles) {
|
||||||
//noinspection ResultOfMethodCallIgnored
|
if (!file.delete()) {
|
||||||
file.delete();
|
LOGGER.warn("Unable to delete " + file.getAbsolutePath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOGGER.warn("Error deleting ics dump: " + ex.getMessage());
|
LOGGER.warn("Error deleting ics dump: " + ex.getMessage());
|
||||||
|
@ -990,8 +990,7 @@ public class LdapConnection extends AbstractConnection {
|
|||||||
|
|
||||||
static class CompoundFilter implements LdapFilter {
|
static class CompoundFilter implements LdapFilter {
|
||||||
final Set<LdapFilter> criteria = new HashSet<LdapFilter>();
|
final Set<LdapFilter> criteria = new HashSet<LdapFilter>();
|
||||||
int type;
|
final int type;
|
||||||
|
|
||||||
|
|
||||||
CompoundFilter(int filterType) {
|
CompoundFilter(int filterType) {
|
||||||
type = filterType;
|
type = filterType;
|
||||||
@ -1166,7 +1165,7 @@ public class LdapConnection extends AbstractConnection {
|
|||||||
final String value;
|
final String value;
|
||||||
final int mode;
|
final int mode;
|
||||||
final int operator;
|
final int operator;
|
||||||
boolean canIgnore;
|
final boolean canIgnore;
|
||||||
|
|
||||||
SimpleFilter(String attributeName) {
|
SimpleFilter(String attributeName) {
|
||||||
this.attributeName = attributeName;
|
this.attributeName = attributeName;
|
||||||
|
Loading…
Reference in New Issue
Block a user