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

LDAP: send error on DIGEST-MD5 bind request

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1755 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-08-03 19:44:22 +00:00
parent 7005f6dacd
commit b6789e75f2

View File

@ -508,7 +508,13 @@ public class LdapConnection extends AbstractConnection {
reqBer.parseSeq(null); reqBer.parseSeq(null);
ldapVersion = reqBer.parseInt(); ldapVersion = reqBer.parseInt();
userName = reqBer.parseString(isLdapV3()); userName = reqBer.parseString(isLdapV3());
if (reqBer.peekByte() == (Ber.ASN_CONTEXT | Ber.ASN_CONSTRUCTOR | 3)) {
reqBer.parseSeq(null);
String mechanism = reqBer.parseString(isLdapV3());
throw new IOException("Unsupported authentication mechanism: "+mechanism);
} else {
password = reqBer.parseStringWithTag(Ber.ASN_CONTEXT, isLdapV3(), null); password = reqBer.parseStringWithTag(Ber.ASN_CONTEXT, isLdapV3(), null);
}
if (userName.length() > 0 && password.length() > 0) { if (userName.length() > 0 && password.length() > 0) {
DavGatewayTray.debug(new BundleMessage("LOG_LDAP_REQ_BIND_USER", currentMessageId, userName)); DavGatewayTray.debug(new BundleMessage("LOG_LDAP_REQ_BIND_USER", currentMessageId, userName));