Hello there,
I have a strange problem with NTLM library - I use it to authorize with IIS
server in our domain and it work well with Ruby 1.8.6 (patch 111), but
with JRuby 1.1.4 (means Ruby 1.8.6 patch 114) it does not work.
So far I did not find more of details but in Wireshare I can see, that
with JRuby there is an additional unknown character included in username sent
in NTLM T3 response (3rd phase, second client's request) showing like ?USER
in Wireshark. The extra char is as FF FE (invalid unicode character) which
I have no idea where it comes from :-(
Actually if I provide the login and password in unicode and pass :unicode
argument to t2.response function, it does work! So there is some unicode
Ok so this is the problem (in jirb)
irb(main):003:0> Net::NTLM::encode_utf16le('test')
=> "\377\376t\000e\000s\000t\000"
See aditional chars at the beginning of the string.
So Kconv from openssl is the problem ... it clear that this funtion produces
the extra char in the string during conversion, but currently I have no time
to dig deeper in the problem. Let's hope someone else will or I will have time
to get back to it.
It you would know about some solution, please share it.
Otherwise I advice to use user and password directly in UTF but still this may
create some other problems ...
Anyway ... good luck.
|