Skip to content

Commit bf310eb

Browse files
committed
Use realm as domain, instead of hostname
Update NTLM implementation.
1 parent 4fe6562 commit bf310eb

File tree

3 files changed

+377
-205
lines changed

3 files changed

+377
-205
lines changed

src/org/zaproxy/zap/authentication/HttpAuthenticationMethodType.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,10 @@ public WebSession authenticate(SessionManagementMethod sessionManagementMethod,
120120
AuthScope stateAuthScope = null;
121121
NTCredentials stateCredentials = null;
122122
try {
123-
stateAuthScope = new AuthScope(this.hostname, this.port,
124-
(this.realm == null || this.realm.isEmpty()) ? AuthScope.ANY_REALM : this.realm);
123+
stateAuthScope = new AuthScope(this.hostname, this.port, AuthScope.ANY_REALM);
125124
stateCredentials = new NTCredentials(userCredentials.getUsername(),
126125
userCredentials.getPassword(), InetAddress.getLocalHost().getCanonicalHostName(),
127-
this.hostname);
126+
this.realm);
128127
session.getHttpState().setCredentials(stateAuthScope, stateCredentials);
129128
} catch (UnknownHostException e1) {
130129
log.error(e1.getMessage(), e1);

0 commit comments

Comments
 (0)