Set minimal permissions to temp files (#148899)
| | |
| | | $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; |
| | |
| | | } |
| | | |
| | | if ($result === '') { |
| | | @chmod($filename, 0600); |
| | | return $type; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | if ($result) { |
| | | @chmod($filename, 0600); |
| | | return $type; |
| | | } |
| | | } |
| | |
| | | $result = rcube::exec($convert . ' 2>&1 -colorspace RGB -quality 75 {in} {type}:{out}', $p); |
| | | |
| | | if ($result === '') { |
| | | @chmod($filename, 0600); |
| | | return true; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | if ($result) { |
| | | @chmod($filename, 0600); |
| | | return true; |
| | | } |
| | | } |