Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6174ec71
Commit
6174ec71
authored
Dec 17, 2002
by
Chris Withers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #685: made security declarations work for python packages
that are not Zope products.
parent
c2b5a461
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/AccessControl/ZopeGuards.py
lib/python/AccessControl/ZopeGuards.py
+5
-1
No files found.
doc/CHANGES.txt
View file @
6174ec71
...
@@ -25,6 +25,9 @@ Zope Changes
...
@@ -25,6 +25,9 @@ Zope Changes
Bugs Fixed
Bugs Fixed
- Collector #685: made security declarations work for python packages
that are not Zope products.
- Collector #697: Multiple selection properties were incorrectly
- Collector #697: Multiple selection properties were incorrectly
marshalled. note than any non-ascii multiple selection properties
marshalled. note than any non-ascii multiple selection properties
modified in versions without this fix will have been corrupted in
modified in versions without this fix will have been corrupted in
...
...
lib/python/AccessControl/ZopeGuards.py
View file @
6174ec71
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
##############################################################################
##############################################################################
__version__
=
'$Revision: 1.1
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
3
$'
[
11
:
-
2
]
from
RestrictedPython.Guards
import
safe_builtins
,
_full_read_guard
,
\
from
RestrictedPython.Guards
import
safe_builtins
,
_full_read_guard
,
\
full_write_guard
full_write_guard
...
@@ -125,6 +125,10 @@ safe_builtins['map'] = guarded_map
...
@@ -125,6 +125,10 @@ safe_builtins['map'] = guarded_map
import
sys
import
sys
def
guarded_import
(
mname
,
globals
=
{},
locals
=
{},
fromlist
=
None
):
def
guarded_import
(
mname
,
globals
=
{},
locals
=
{},
fromlist
=
None
):
# do initial import to give module a chance to make security declarations
__import__
(
mname
,
globals
,
locals
,
fromlist
)
mnameparts
=
mname
.
split
(
'.'
)
mnameparts
=
mname
.
split
(
'.'
)
firstmname
=
mnameparts
[
0
]
firstmname
=
mnameparts
[
0
]
validate
=
getSecurityManager
().
validate
validate
=
getSecurityManager
().
validate
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment