[CalendarServer-changes] [3126] CalendarServer/trunk/lib-patches/Twisted/twisted.web2.auth.digest. patch
source_changes at macosforge.org
source_changes at macosforge.org
Mon Oct 6 16:58:05 PDT 2008
Revision: 3126
http://trac.macosforge.org/projects/calendarserver/changeset/3126
Author: wsanchez at apple.com
Date: 2008-10-06 16:58:04 -0700 (Mon, 06 Oct 2008)
Log Message:
-----------
md5() not md5.new()
Modified Paths:
--------------
CalendarServer/trunk/lib-patches/Twisted/twisted.web2.auth.digest.patch
Modified: CalendarServer/trunk/lib-patches/Twisted/twisted.web2.auth.digest.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.auth.digest.patch 2008-10-06 23:16:23 UTC (rev 3125)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.auth.digest.patch 2008-10-06 23:58:04 UTC (rev 3126)
@@ -31,6 +31,24 @@
}
# DigestCalcHA1
+@@ -228,7 +236,7 @@
+ # Now, what we do is encode the nonce, client ip and a timestamp
+ # in the opaque value with a suitable digest
+ key = "%s,%s,%s" % (nonce, clientip, str(int(self._getTime())))
+- digest = md5.new(key + self.privateKey).hexdigest()
++ digest = md5(key + self.privateKey).hexdigest()
+ ekey = key.encode('base64')
+ return "%s-%s" % (digest, ekey.strip('\n'))
+
+@@ -274,7 +282,7 @@
+ 'Invalid response, incompatible opaque/nonce too old')
+
+ # Verify the digest
+- digest = md5.new(key + self.privateKey).hexdigest()
++ digest = md5(key + self.privateKey).hexdigest()
+ if digest != opaqueParts[0]:
+ raise error.LoginFailed('Invalid response, invalid opaque value')
+
@@ -315,18 +323,18 @@
@raise: L{error.LoginFailed} if the response does not contain a
username, a nonce, an opaque, or if the opaque is invalid.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081006/1e167132/attachment-0001.html
More information about the calendarserver-changes
mailing list