diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2008-01-11 18:40:35 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2008-01-11 18:40:35 (GMT) |
commit | 0eb65f82a5c244d0a0444b7d49f3d4139f2f03a3 (patch) | |
tree | c91165271c957404bfde4726cf3f6f20f5a65ccf | |
parent | dc0b6d8841c850af545f4fe5e3c9d284b9d6e55a (diff) |
Make the fix for #5586 work with security.
-rw-r--r-- | Area.py | 6 | ||||
-rw-r--r-- | NEWS | 2 |
2 files changed, 6 insertions, 2 deletions
@@ -621,8 +621,9 @@ class Area(gtk.DrawingArea): @param self -- the Area object (GtkDrawingArea) """ clipBoard = gtk.Clipboard() - temp_dir = os.environ.get('SUGAR_ACTIVITY_ROOT', None) - if temp_dir is None: + if 'SUGAR_ACTIVITY_ROOT' in os.environ: + temp_dir = os.path.join(os.environ.get('SUGAR_ACTIVITY_ROOT'), 'instance') + else: temp_dir = '/tmp' f, tempPath = tempfile.mkstemp(suffix='.png', dir=temp_dir) @@ -633,6 +634,7 @@ class Area(gtk.DrawingArea): pixbuf_copy = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,True,8,size[0],size[1]) pixbuf_copy.get_from_drawable(self.pixmap_sel, gtk.gdk.colormap_get_system(),0,0,0,0,size[0],size[1]) pixbuf_copy.save(tempPath,'png') + os.chmod(tempPath, 0604) clipBoard.set_with_data( [('text/uri-list', 0, 0)], self._copyGetFunc, self._copyClearFunc, tempPath) else : @@ -1,3 +1,5 @@ +* Make the fix for #5586 work with security. (tomeu) + 16 * #5586: Copy clippings as text/uri-list. (tomeu) |