hierynomus / smbj

Server Message Block (SMB2, SMB3) implementation in Java
Other
713 stars 180 forks source link

Ensure session flags are set once session is initialised to prevent NPE #625

Closed asmith-r7 closed 3 years ago

asmith-r7 commented 3 years ago

Established on session context is never called, meaning the session flags are never initialised on the session context which can lead to NPE when calling isGuest() or isAnonymous() on a session instance.

Based on code prior to 10.0.1-SNAPSHOT, I've added this right at the end of the session initialisation but happy to move elsewhere if deemed appropriate.

hierynomus commented 3 years ago

Sorry for that oversight, added the established method and never calling it... 🤦