src/reportlab/platypus/flowables.py
changeset 4551 d357e2acc856
parent 4535 6f649f4056b5
child 4559 51a521ad7dd3
--- a/src/reportlab/platypus/flowables.py	Thu Oct 24 15:53:59 2019 +0100
+++ b/src/reportlab/platypus/flowables.py	Thu Oct 24 16:07:15 2019 +0100
@@ -30,7 +30,7 @@
 from reportlab.lib.rl_accel import fp_str
 from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT, TA_JUSTIFY
 from reportlab.lib.styles import _baseFontName
-from reportlab.lib.utils import strTypes
+from reportlab.lib.utils import strTypes, safer_globals
 from reportlab.lib.abag import ABag
 from reportlab.pdfbase import pdfutils
 from reportlab.pdfbase.pdfmetrics import stringWidth
@@ -755,7 +755,7 @@
     def wrap(self, availWidth, availHeight):
         return (0,0)
     def draw(self):
-        exec(self.command, globals(), {'canvas':self.canv})
+        exec(self.command, safer_globals(), {'canvas':self.canv})
 
 def _nullCallable(*args,**kwds):
     pass