Skip to content

Commit

Permalink
fixing the order for escaping unicode padding
Browse files Browse the repository at this point in the history
  • Loading branch information
Ping Yu committed Oct 28, 2010
1 parent f2b1490 commit bcb0877
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/net/ntlm_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -692,12 +692,11 @@ def response(arg, opt = {})
opt[:unicode] = false
end
if has_flag?(:UNICODE) and !opt[:unicode]
usr = NTLM::encode_utf16le(usr).gsub(/^\367\377/,'')
pwd = NTLM::encode_utf16le(pwd).gsub(/^\367\377/,'')
ws = NTLM::encode_utf16le(ws).gsub(/^\367\377/,'')
usr = NTLM::encode_utf16le(usr).gsub(/^\377\376/,'')
pwd = NTLM::encode_utf16le(pwd).gsub(/^\377\376/,'')
ws = NTLM::encode_utf16le(ws).gsub(/^\377\376/,'')
opt[:unicode] = true
end

tgt = self.target_name
ti = self.target_info

Expand Down

0 comments on commit bcb0877

Please sign in to comment.