Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

63706: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (4.3.0.BF)
      63631: MNT-10806: NPE with passthru SSO when client does not accept cookies
      Add improved logging for case when NTLM details can not be retrieved from session.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@64317 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-03-14 16:48:23 +00:00
parent e3b808c63c
commit c7a7beae1c

View File

@@ -565,6 +565,13 @@ public abstract class BaseNTLMAuthenticationFilter extends BaseSSOAuthentication
}
else
{
if (ntlmDetails == null)
{
if (logger.isWarnEnabled())
logger.warn("Authentication failed: NTLM details can not be retrieved from session. Client must support cookies.");
restartLoginChallenge(context, req, res);
return false;
}
// Passthru mode, send the hashed password details to the passthru authentication server
NTLMPassthruToken authToken = (NTLMPassthruToken) ntlmDetails.getAuthenticationToken();
authToken.setUserAndPassword(type3Msg.getUserName(), type3Msg.getNTLMHash(), PasswordEncryptor.NTLM1);