Set minimal permissions to temp files (#148899)

pull/68/head
Thomas Bruederli 11 years ago
parent a021d6f187
commit b413bb2b60

@ -60,6 +60,7 @@ class filesystem_attachments extends rcube_plugin
$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;

@ -124,6 +124,7 @@ class rcube_image
}
if ($result === '') {
@chmod($filename, 0600);
return $type;
}
}
@ -183,6 +184,7 @@ class rcube_image
}
if ($result) {
@chmod($filename, 0600);
return $type;
}
}
@ -223,6 +225,7 @@ class rcube_image
$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 @@ class rcube_image
}
if ($result) {
@chmod($filename, 0600);
return true;
}
}

Loading…
Cancel
Save