[CalendarServer-changes] [5134] CalendarServer/trunk/twistedcaldav/notify.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Feb 16 14:28:57 PST 2010


Revision: 5134
          http://trac.macosforge.org/projects/calendarserver/changeset/5134
Author:   sagen at apple.com
Date:     2010-02-16 14:28:57 -0800 (Tue, 16 Feb 2010)
Log Message:
-----------
Turn off digest auth for xmpp temporarily

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/notify.py

Modified: CalendarServer/trunk/twistedcaldav/notify.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/notify.py	2010-02-16 22:27:33 UTC (rev 5133)
+++ CalendarServer/trunk/twistedcaldav/notify.py	2010-02-16 22:28:57 UTC (rev 5134)
@@ -85,6 +85,30 @@
 ]
 
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+# FIXME:
+# Temporarily ignore digest auth as it's broken for local accounts
+
+NS_XMPP_SASL = 'urn:ietf:params:xml:ns:xmpp-sasl'
+
+from twisted.words.protocols.jabber import sasl
+def get_mechanisms(xs):
+    """
+    Parse the SASL feature to extract the available mechanism names.
+    """
+    mechanisms = []
+    for element in xs.features[(NS_XMPP_SASL, 'mechanisms')].elements():
+        if element.name == 'mechanism':
+            mechanism = str(element)
+            if mechanism != "DIGEST-MD5":
+                mechanisms.append(str(element))
+
+    return mechanisms
+
+sasl.get_mechanisms = get_mechanisms
+
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 # Classes used within calendarserver itself
 #
 
@@ -1366,4 +1390,3 @@
 
     def stopService(self):
         self.client.stopService()
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100216/a74dffdf/attachment.html>


More information about the calendarserver-changes mailing list