[CalendarServer-changes] [4157] CalendarServer/trunk/twistedcaldav/mail.py
source_changes at macosforge.org
source_changes at macosforge.org
Sun May 3 10:19:07 PDT 2009
Revision: 4157
http://trac.macosforge.org/projects/calendarserver/changeset/4157
Author: sagen at apple.com
Date: 2009-05-03 10:19:07 -0700 (Sun, 03 May 2009)
Log Message:
-----------
Always allow Digest auth on the /inbox resource (for iMIP reply injection)
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/mail.py
Modified: CalendarServer/trunk/twistedcaldav/mail.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/mail.py 2009-05-03 17:10:20 UTC (rev 4156)
+++ CalendarServer/trunk/twistedcaldav/mail.py 2009-05-03 17:19:07 UTC (rev 4157)
@@ -39,6 +39,7 @@
from twisted.web2.http import Response, HTTPError
from twisted.web2.http_headers import MimeType
+from twistedcaldav.directory.digest import QopDigestCredentialFactory
from twistedcaldav import ical, caldavxml
from twistedcaldav.config import config, defaultConfig, defaultConfigFile
from twistedcaldav.ical import Property
@@ -184,6 +185,23 @@
self.parent = parent
+ def authorize(self, request, privileges, recurse=False):
+
+ # Always allow digest for iMIP injection, regardless of overall
+ # server authentication settings
+ if not hasattr(self, "_imipCredentialFactory"):
+ schemeConfig = config.Authentication.Digest
+ self._imipCredentialFactory = QopDigestCredentialFactory(
+ schemeConfig["Algorithm"], schemeConfig["Qop"],
+ "iMIP Injection")
+
+ request.credentialFactories = {
+ 'digest' : self._imipCredentialFactory
+ }
+
+ return super(IMIPInboxResource, self).authorize(request, privileges,
+ recurse=recurse)
+
def accessControlList(self, request, inheritance=True,
expanding=False, inherited_aces=None):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090503/8ebe7787/attachment-0001.html>
More information about the calendarserver-changes
mailing list