From bd2d6065269ffe1894414b3bc7267cb3e332e6a9 Mon Sep 17 00:00:00 2001 From: Matthew Kanwisher Date: Thu, 30 Jan 2014 23:52:25 +0700 Subject: [PATCH] ugh sometimes you have to patch things --- ntlm/ntlmv2.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ntlm/ntlmv2.go b/ntlm/ntlmv2.go index e87389c..d6528d4 100644 --- a/ntlm/ntlmv2.go +++ b/ntlm/ntlmv2.go @@ -238,6 +238,15 @@ func (n *V2ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e return err } + + if am.Version == nil { + //UGH not entirely sure how this could possibly happen, going to put this in for now + //TODO investigate if this ever is really happening + am.Version = &VersionStruct{ProductMajorVersion: uint8(5), ProductMinorVersion: uint8(1), ProductBuild: uint16(2600), NTLMRevisionCurrent: uint8(15)} + + l4g.Error("Nil version in ntlmv2") + } + err = n.calculateKeys(am.Version.NTLMRevisionCurrent) if err != nil { return err