[jcifs] Bug in NtlmHttpFilter

Michael B Allen mba2000 at ioplex.com
Thu Mar 23 20:30:16 GMT 2006


On Thu, 23 Mar 2006 16:55:46 +0300
Iliya Roubin <iroubin at yandex-team.ru> wrote:

> I have deployed the NtlmHttpFilter with the same configuration as 
> described in http://jcifs.samba.org/src/docs/ntlmhttpauth.html:
> 
> <filter>
>     <filter-name>NtlmHttpFilter</filter-name>
>     <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
> 
>     <init-param>
>         <param-name>jcifs.smb.client.domain</param-name>
>         <param-value>MYDOMAIN</param-value>
>     </init-param>
>     <init-param>
>         <param-name>jcifs.netbios.wins</param-name>
>         <param-value>server1,server2</param-value>
>     </init-param>
> </filter>
> 
> <filter-mapping>
>     <filter-name>NtlmHttpFilter</filter-name>
>     <url-pattern>/*</url-pattern>
> </filter-mapping>
> 
> With IE and FireFox everything works fine (I can see that logon requests 
> are load balanced between server1 and server2), but with Safari and 
> Konqueror I get the following exception:
> 
> jcifs.smb.SmbException:
> java.lang.ArrayIndexOutOfBoundsException
>     at java.lang.System.arraycopy(Native Method)
>     at jcifs.smb.SigningDigest.<init>(SigningDigest.java:42)
>     at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:260)

Strange. This looks like the SmbTransport.server.encryptionKey is not
being initialized properly.

Do Safari and Konqueror support NTLM HTTP authentication? Regardless the
code should be debugged further to determine where the initialization
failure is occurring and either fix it or throw a more appropriate
exception. I'll add this to The List but I can't guarantee I will perform
the necessary work to include a fix. I don't think I have Konqueror and
I'm not certain I want to mess up my mac trying to figure out how to
join it to the domain.

If you perform a more detailed analysis please let us know.

Mike


More information about the jcifs mailing list