From 2d7ccf30d3f3212dc8080983464dd6d20efd27f8 Mon Sep 17 00:00:00 2001 From: Gary Spencer Date: Mon, 9 Jul 2007 14:37:45 +0000 Subject: [PATCH] Fixed problem with NTLMv2 encryption uppercasing the domain. AR-1593. Added toString() and getMessage() methods to SMBSrvException to fix occasional incorrect error text when logged. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6197 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../filesys/server/auth/PasswordEncryptor.java | 2 +- .../filesys/smb/server/SMBSrvException.java | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/filesys/server/auth/PasswordEncryptor.java b/source/java/org/alfresco/filesys/server/auth/PasswordEncryptor.java index 513d7a2d53..aa1ab15f66 100644 --- a/source/java/org/alfresco/filesys/server/auth/PasswordEncryptor.java +++ b/source/java/org/alfresco/filesys/server/auth/PasswordEncryptor.java @@ -493,7 +493,7 @@ public class PasswordEncryptor StringBuilder str = new StringBuilder(); str.append(userName.toUpperCase()); - str.append(domain.toUpperCase()); + str.append(domain); String dataStr = str.toString(); byte[] dataByts = null; diff --git a/source/java/org/alfresco/filesys/smb/server/SMBSrvException.java b/source/java/org/alfresco/filesys/smb/server/SMBSrvException.java index 0c338b50f9..a182a7d1d7 100644 --- a/source/java/org/alfresco/filesys/smb/server/SMBSrvException.java +++ b/source/java/org/alfresco/filesys/smb/server/SMBSrvException.java @@ -154,4 +154,22 @@ public class SMBSrvException extends Exception return SMBErrorText.ErrorString(SMBStatus.NTErr, getNTErrorCode()); return SMBErrorText.ErrorString(m_errorclass, m_errorcode); } + + /** + * Return the error message + * + * @return String + */ + public String getMessage() { + return getErrorText(); + } + + /** + * Return the exception as a string + * + * @return String + */ + public String toString() { + return getErrorText(); + } } \ No newline at end of file