[Spambayes-checkins] spambayes/spambayes Dibbler.py,1.14,1.15

Tony Meyer anadelonbrin at users.sourceforge.net
Mon Dec 6 02:37:51 CET 2004


Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3159/spambayes

Modified Files:
	Dibbler.py 
Log Message:
Fix the regex that the auth digest used (+ was outside the group, so only the first
 letter of the key would be used).

IE 6.0 and Firefox 1.0 appear to give back improper auth responses, based on my limited
 understanding of the RFC, so make allowances for that.  Auth digest works for me
 now, at least.

(If anyone would like to check this, that would be great).  This needs to be backported,
 too (I'll do that later).

Index: Dibbler.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/Dibbler.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Dibbler.py	19 Jul 2004 02:10:12 -0000	1.14
--- Dibbler.py	6 Dec 2004 01:37:43 -0000	1.15
***************
*** 347,351 ****
      # RE to extract option="value" fields from
      # digest auth login field
!     _login_splitter = re.compile('([a-zA-Z])+=(".*?"|.*?),?')
  
      def __init__(self, clientSocket, server, context):
--- 347,351 ----
      # RE to extract option="value" fields from
      # digest auth login field
!     _login_splitter = re.compile('([a-zA-Z]+)=(".*?"|.*?),?')
  
      def __init__(self, clientSocket, server, context):
***************
*** 631,634 ****
--- 631,640 ----
          unhashedDigest = ""
          if options.has_key("qop"):
+             # IE 6.0 doesn't give nc back correctly?
+             if not options["nc"]:
+                 options["nc"] = "00000001"
+             # Firefox 1.0 doesn't give qop back correctly?
+             if not options["qop"]:
+                 options["qop"] = "auth"
              unhashedDigest = "%s:%s:%s:%s:%s:%s" % \
                              (HA1, nonce,



More information about the Spambayes-checkins mailing list