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
This commit is contained in:
Gary Spencer
2007-07-09 14:37:45 +00:00
parent 6b983aafec
commit 2d7ccf30d3
2 changed files with 19 additions and 1 deletions

View File

@@ -493,7 +493,7 @@ public class PasswordEncryptor
StringBuilder str = new StringBuilder(); StringBuilder str = new StringBuilder();
str.append(userName.toUpperCase()); str.append(userName.toUpperCase());
str.append(domain.toUpperCase()); str.append(domain);
String dataStr = str.toString(); String dataStr = str.toString();
byte[] dataByts = null; byte[] dataByts = null;

View File

@@ -154,4 +154,22 @@ public class SMBSrvException extends Exception
return SMBErrorText.ErrorString(SMBStatus.NTErr, getNTErrorCode()); return SMBErrorText.ErrorString(SMBStatus.NTErr, getNTErrorCode());
return SMBErrorText.ErrorString(m_errorclass, m_errorcode); 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();
}
} }