mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-12 22:18:11 -05:00
Always exclude NTLM authentication, not only for proxy authorization
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@500 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
52dd976637
commit
42ae1521a7
@ -1,7 +1,7 @@
|
||||
package davmail.http;
|
||||
|
||||
import davmail.Settings;
|
||||
import davmail.tray.DavGatewayTray;
|
||||
import davmail.ui.tray.DavGatewayTray;
|
||||
import org.apache.commons.httpclient.*;
|
||||
import org.apache.commons.httpclient.auth.AuthPolicy;
|
||||
import org.apache.commons.httpclient.auth.AuthScope;
|
||||
@ -73,6 +73,12 @@ public final class DavGatewayHttpClientFacade {
|
||||
public static void configureClient(HttpClient httpClient) {
|
||||
httpClient.setHttpConnectionManager(multiThreadedHttpConnectionManager);
|
||||
|
||||
ArrayList<String> authPrefs = new ArrayList<String>();
|
||||
authPrefs.add(AuthPolicy.DIGEST);
|
||||
authPrefs.add(AuthPolicy.BASIC);
|
||||
// exclude the NTLM authentication scheme
|
||||
httpClient.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
|
||||
|
||||
boolean enableProxy = Settings.getBooleanProperty("davmail.enableProxy");
|
||||
String proxyHost = null;
|
||||
int proxyPort = 0;
|
||||
@ -91,12 +97,6 @@ public final class DavGatewayHttpClientFacade {
|
||||
httpClient.getHostConfiguration().setProxy(proxyHost, proxyPort);
|
||||
if (proxyUser != null && proxyUser.length() > 0) {
|
||||
|
||||
ArrayList<String> authPrefs = new ArrayList<String>();
|
||||
authPrefs.add(AuthPolicy.DIGEST);
|
||||
authPrefs.add(AuthPolicy.BASIC);
|
||||
// exclude the NTLM authentication scheme
|
||||
httpClient.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
|
||||
|
||||
AuthScope authScope = new AuthScope(proxyHost, proxyPort, AuthScope.ANY_REALM);
|
||||
|
||||
// detect ntlm authentication (windows domain name in user name)
|
||||
|
Loading…
Reference in New Issue
Block a user