Skip to content

Connection#authenticate(AuthenticationContext.anonymous()) crashes on v0.12.0 #779

Closed
@bubbleguuum

Description

@bubbleguuum

calling Connection#authenticate(AuthenticationContext.anonymous()) against my Samba server will always crash with:

Caused by: java.lang.IllegalArgumentException: Missing argument
                         E      at javax.crypto.spec.SecretKeySpec.<init>(SecretKeySpec.java:93)
                         E      at com.hierynomus.smbj.connection.SMBSessionBuilder.setupSession(SMBSessionBuilder.java:166)
                         E      at com.hierynomus.smbj.connection.SMBSessionBuilder.setupSession(SMBSessionBuilder.java:152)
                         E      at com.hierynomus.smbj.connection.SMBSessionBuilder.establish(SMBSessionBuilder.java:119)
                         E      at com.hierynomus.smbj.connection.Connection.authenticate(Connection.java:202)

This worked fine in v0.11.5
Apprently the ctx.sessionKey passed to the SecretKeySpec constructor is null.

Passing an AuthenticationContext initialized with a non-empty username (can be anything) makes the crash go away, but this should not be necessary to get a Session suitable for enumerating shares with smbj-rpc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions