Commit 8642647c authored by Andreas Jung's avatar Andreas Jung

      - Propertysheets: Ids like 'values','keys' and 'values' are
        now forbidden as they break WebDAV functionality. Existing
        Propertysheets are not affected
parent 46b57e43
......@@ -196,6 +196,11 @@ Zope Changes
- Collector #185, 341: PCGIServer and FCGIServer logs corrected
and now output extended information like HTTPServer does.
- Propertysheets: Ids like 'values','keys' and 'values' are
now forbidden as they break WebDAV functionality. Existing
Propertysheets are not affected
Zope 2.5.1 beta 1
Bugs Fixed
......
......@@ -12,7 +12,7 @@
##############################################################################
"""Property sheets"""
__version__='$Revision: 1.83 $'[11:-2]
__version__='$Revision: 1.84 $'[11:-2]
import time, App.Management, Globals
from webdav.WriteLockInterface import WriteLockInterface
......@@ -106,6 +106,8 @@ class PropertySheet(Traversable, Persistent, Implicit):
),
)
__reserved_ids= ('values','items')
def property_extensible_schema__(self):
"""Return a flag indicating whether new properties may be
added or removed."""
......@@ -115,6 +117,11 @@ class PropertySheet(Traversable, Persistent, Implicit):
# Create a new property set, using the given id and namespace
# string. The namespace string should be usable as an xml name-
# space identifier.
if id in self.__reserved_ids:
raise ValueError, "'%s' is a reserved Id (forbidden Ids are: %s) " % \
(id, self.__reserved_ids)
self.id=id
self._md=md or {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment