From: Felix Schumacher Date: Tue, 21 Jul 2009 18:13:02 +0000 (+0200) Subject: jcifs-1.3.11 from tgz X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=da0f786790afb7988daed207e1d30b5ce76523d0;p=jcifs_without_docs.git jcifs-1.3.11 from tgz Tue Jul 21 11:19:39 EDT 2009 jcifs-1.3.11 The domain was incorrectly upper-cased when performing NTLMv2 authentication. It so happened this was harmless to JCIFS but the nTOWFv2 routine indicates that the domain is not supposed to be upper-cased (unlike the username which is). --- diff --git a/README.txt b/README.txt index 0201a95..919af5d 100644 --- a/README.txt +++ b/README.txt @@ -1,3 +1,11 @@ +Tue Jul 21 11:19:39 EDT 2009 +jcifs-1.3.11 + +The domain was incorrectly upper-cased when performing NTLMv2 +authentication. It so happened this was harmless to JCIFS but the nTOWFv2 +routine indicates that the domain is not supposed to be upper-cased +(unlike the username which is). + Wed Jun 3 19:42:58 EDT 2009 jcifs-1.3.10 diff --git a/build.xml b/build.xml index 5cba503..0796b3c 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - - + + diff --git a/examples/10883563.doc b/examples/10883563.doc deleted file mode 100644 index 62644d9..0000000 --- a/examples/10883563.doc +++ /dev/null @@ -1,6 +0,0 @@ -C:\tmp>ktpass /princ HTTP/www.foo.net@WIN.NET /ptype KRB5_NT_PRINCIPAL /desonly /pass asj7j112233hh4455 /mapuser test2 -Targeting domain controller: ts0.win.net -Using legacy password setting method -Successfully mapped HTTP/www.foo.net to test2. -Key created. -Account test2 has been set for DES-only encryption. \ No newline at end of file diff --git a/examples/runtests.sh b/examples/runtests.sh index b091299..d648054 100644 --- a/examples/runtests.sh +++ b/examples/runtests.sh @@ -12,9 +12,9 @@ RUN="${JAVA_HOME}/bin/java -cp ${CLASSPATH} -Djcifs.properties=${PROPERTIES}" # Domain-based DFS #SERVER=192.168.2.110 -#SERVER=w.net -#SHARE=root2 -#DIR=test +SERVER=w.net +SHARE=root2 +DIR=test # smb://fs1.w.net/DFSStandaloneRoot/DFSStandaloneLink/test/ # smb://dc1.w.net/root2/link2/test/ @@ -22,9 +22,9 @@ RUN="${JAVA_HOME}/bin/java -cp ${CLASSPATH} -Djcifs.properties=${PROPERTIES}" # smb://dc3.x.net/tmp/test/ # Stand-alone DFS #SERVER=192.168.2.113 -SERVER=fs1.w.net -SHARE=DFSStandaloneRoot -DIR=DFSStandaloneLink/test +#SERVER=fs1.w.net +#SHARE=DFSStandaloneRoot +#DIR=DFSStandaloneLink/test WRITE_DIR=${DIR}/ SRC_DIR=${DIR}/Junk diff --git a/src/jcifs/ntlmssp/Type3Message.java b/src/jcifs/ntlmssp/Type3Message.java index baee1f7..8bfe930 100644 --- a/src/jcifs/ntlmssp/Type3Message.java +++ b/src/jcifs/ntlmssp/Type3Message.java @@ -433,8 +433,8 @@ public class Type3Message extends NtlmMessage { byte[] domain = null; if (domainName != null && domainName.length() != 0) { domain = unicode ? - domainName.toUpperCase().getBytes(UNI_ENCODING) : - domainName.toUpperCase().getBytes(oem); + domainName.getBytes(UNI_ENCODING) : + domainName.getBytes(oem); } int domainLength = (domain != null) ? domain.length : 0; String userName = getUser(); diff --git a/src/jcifs/smb/NtlmPasswordAuthentication.java b/src/jcifs/smb/NtlmPasswordAuthentication.java index db917c1..d256d48 100644 --- a/src/jcifs/smb/NtlmPasswordAuthentication.java +++ b/src/jcifs/smb/NtlmPasswordAuthentication.java @@ -207,7 +207,7 @@ public final class NtlmPasswordAuthentication implements Principal, Serializable md4.update(password.getBytes(SmbConstants.UNI_ENCODING)); HMACT64 hmac = new HMACT64(md4.digest()); hmac.update(username.toUpperCase().getBytes(SmbConstants.UNI_ENCODING)); - hmac.update(domain.toUpperCase().getBytes(SmbConstants.UNI_ENCODING)); + hmac.update(domain.getBytes(SmbConstants.UNI_ENCODING)); return hmac.digest(); } catch (UnsupportedEncodingException uee) { throw new RuntimeException(uee.getMessage());