[Tkabber-dev] [tclxmpp commit] r103 - * xmpp/https.tcl: Also, added a few additional debug messages.

codesite-noreply at google.com codesite-noreply at google.com
Fri Apr 3 15:07:59 MSD 2009


Author: sgolovan
Date: Fri Apr  3 04:07:25 2009
New Revision: 103

Modified:
    trunk/ChangeLog
    trunk/xmpp/https.tcl

Log:
	* xmpp/https.tcl: Also, added a few additional debug messages.


Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Fri Apr  3 04:07:25 2009
@@ -1,6 +1,7 @@
  2009-04-03  Sergei Golovan  <sgolovan at nes.ru>

-	* xmpp/https.tcl: Fixed proxy NTLM authentication.
+	* xmpp/https.tcl: Fixed proxy NTLM authentication. Also, added a few
+	  additional debug messages.

  2009-03-31  Sergei Golovan  <sgolovan at nes.ru>


Modified: trunk/xmpp/https.tcl
==============================================================================
--- trunk/xmpp/https.tcl	(original)
+++ trunk/xmpp/https.tcl	Fri Apr  3 04:07:25 2009
@@ -181,6 +181,7 @@
          set content_length -1
          set method basic
          while {[string length [set header [gets $state(sock)]]]} {
+            Debug $token 2 "$header"
              switch -- [HttpHeaderName $header] {
                  proxy-authenticate {
                      if {[string equal -length 4 [HttpHeaderBody $header] \
@@ -332,17 +333,11 @@

      Debug $token 2 ""

-    set domain ""
-    set host [info hostname]
-
-    # if username is domain/username or domain\username
-    # then set domain and username
-    set username $state(-username)
-    regexp {(\w+)[\\/](.*)} $username -> domain username
-
      set message1 \
          [string map {\n {}} \
-                [base64::encode [::SASL::NTLM::CreateGreeting $domain  
$host]]]
+                [base64::encode [::SASL::NTLM::CreateGreeting "" ""]]]
+
+    Debug $token 2 "NTLM $message1"

      PutsConnectQuery $token "NTLM $message1"

@@ -390,6 +385,7 @@
      set content_length -1
      set message2 ""
      while {![string equal [set header [gets $state(sock)]] ""]} {
+        Debug $token 2 "$header"
          switch -- [HttpHeaderName $header] {
              proxy-authenticate {
                  set body [HttpHeaderBody $header]
@@ -405,6 +401,8 @@

      ReadProxyJunk $token $content_length

+    Debug $token 2 "NTLM $message2"
+
      array set challenge [::SASL::NTLM::Decode [base64::decode $message2]]

      # if username is domain/username or domain\username
@@ -421,6 +419,8 @@
                                                        $state(-password)  \
                                                        $challenge(nonce)  \
                                                        $challenge(flags)]]]
+    Debug $token 2 "NTLM $message3"
+
      PutsConnectQuery $token "NTLM $message3"

      fileevent $state(sock) readable \


More information about the Tkabber-dev mailing list