Skip to content

Commit

Permalink
Changes to module security
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Simpson committed Dec 4, 2000
1 parent 3193850 commit e4440bd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Guarded.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
#
##############################################################################

__version__='$Revision: 1.1 $'[11:-2]
__version__='$Revision: 1.2 $'[11:-2]

from zbytecodehacks.VSExec import SafeBlock, GuardedBinaryOps, \
UntupleFunction, RedirectWrites, WriteGuard, RedirectReads, ReadGuard, \
Expand Down Expand Up @@ -235,7 +235,9 @@ def load_module(module, mname, mnameparts, validate, globals, locals):
return
__import__(mname, globals, locals)
nextmodule = modules[mname]
nextmodule.ZopeSecurity = modsec[mname]
if not hasattr(nextmodule, 'ZopeSecurity'):
nextmodule.ZopeSecurity = zs = modsec[mname]
zs.apply(nextmodule)
if module and not validate(module, module, nextname, nextmodule):
return
module = nextmodule
Expand Down

0 comments on commit e4440bd

Please sign in to comment.