Thomas Bruederli
2013-04-10 2741d8ecedb156773328750be0d09ecc89afa4bd
Set minimal permissions to temp files (#148899)
2 files modified
5 ■■■■■ changed files
plugins/filesystem_attachments/filesystem_attachments.php 1 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_image.php 4 ●●●● patch | view | raw | blame | history
plugins/filesystem_attachments/filesystem_attachments.php
@@ -60,6 +60,7 @@
            $args['id'] = $this->file_id();
            $args['path'] = $tmpfname;
            $args['status'] = true;
            @chmod($tmpfname, 0600);  // set correct permissions (#148899)
            // Note the file for later cleanup
            $_SESSION['plugins']['filesystem_attachments'][$group][] = $tmpfname;
program/lib/Roundcube/rcube_image.php
@@ -124,6 +124,7 @@
            }
            if ($result === '') {
                @chmod($filename, 0600);
                return $type;
            }
        }
@@ -183,6 +184,7 @@
            }
            if ($result) {
                @chmod($filename, 0600);
                return $type;
            }
        }
@@ -223,6 +225,7 @@
            $result = rcube::exec($convert . ' 2>&1 -colorspace RGB -quality 75 {in} {type}:{out}', $p);
            if ($result === '') {
                @chmod($filename, 0600);
                return true;
            }
        }
@@ -256,6 +259,7 @@
            }
            if ($result) {
                @chmod($filename, 0600);
                return true;
            }
        }