[jcifs] SmbSession.matches
Manfred Huberbauer
made at gmx.at
Wed Aug 21 00:31:30 EST 2002
Hi
I tested your Library on Tomcat for an Internet-Authentification with
Netscape or Konqueror. Tomcat often returned a NullPointerException and pointed at
the function SmbSession.matches().
In this function you do some tests, but I think, you forgot to test, if all
of them are null. You just test, if one of two is null. Therefore I added a
line, which consideres that.
My matches lookes like this:
boolean matches( NtlmPasswordAuthentication auth, byte[] challenge ) {
return (auth.domain != null && auth.username != null) &&
(this.auth.domain == null || auth.domain.equals(
this.auth.domain )) &&
(this.auth.username == null || auth.username.equals(
this.auth.username )) &&
this.auth.hashEquals( auth.getUnicodeHash( challenge ),
challenge );
}
It doesn't bother if this.auth.domain or this.auth.username are null, but it
works.
Yours
Manfred Madritsch
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
More information about the jcifs
mailing list