[Checkins] SVN: zope.security/trunk/ Fixed a regression introduced in 3.8.1: ``zope.location`` 's LocationProxy did not get a security checker if ``zope.security.decorator`` was not imported manually. Now ``zope.security.decorator`` is imported in ``zope.security.proxy`` without re-introducing the circular import fixed in 3.8.1.

Michael Howitz mh at gocept.com
Sat Sep 24 00:36:06 EST 2011


Log message for revision 122915:
  Fixed a regression introduced in 3.8.1: ``zope.location`` 's LocationProxy did not get a security checker if ``zope.security.decorator`` was not imported manually. Now ``zope.security.decorator`` is imported in ``zope.security.proxy`` without re-introducing the circular import fixed in 3.8.1.
  

Changed:
  U   zope.security/trunk/CHANGES.txt
  U   zope.security/trunk/src/zope/security/proxy.py

-=-
Modified: zope.security/trunk/CHANGES.txt
===================================================================
--- zope.security/trunk/CHANGES.txt	2011-09-24 05:13:01 UTC (rev 122914)
+++ zope.security/trunk/CHANGES.txt	2011-09-24 05:36:03 UTC (rev 122915)
@@ -5,6 +5,11 @@
 3.8.3 (unreleased)
 ------------------
 
+- Fixed a regression introduced in 3.8.1: ``zope.location`` 's LocationProxy
+  did not get a security checker if ``zope.security.decorator`` was not
+  imported manually. Now ``zope.security.decorator`` is imported in
+  ``zope.security.proxy`` without re-introducing the circular import fixed in
+  3.8.1.
 
 3.8.2 (2011-05-24)
 ------------------

Modified: zope.security/trunk/src/zope/security/proxy.py
===================================================================
--- zope.security/trunk/src/zope/security/proxy.py	2011-09-24 05:13:01 UTC (rev 122914)
+++ zope.security/trunk/src/zope/security/proxy.py	2011-09-24 05:36:03 UTC (rev 122915)
@@ -18,6 +18,12 @@
 from zope.security._proxy import getChecker, getObject
 from zope.security._proxy import _Proxy as Proxy
 
+# We need the injection of DecoratedSecurityCheckerDescriptor into
+# zope.location's LocationProxy as soon someone uses security proxies by
+# importing zope.security.proxy:
+import zope.security.decorator
+
+
 removeSecurityProxy = getObject
 
 # This import represents part of the API for this module
@@ -69,3 +75,5 @@
     # being used for isinstance
 
     return builtin_isinstance(removeSecurityProxy(object), cls)
+
+



More information about the checkins mailing list