Reject invalid uploads and expand flow tests.
This commit is contained in:
@@ -7,8 +7,8 @@ echo '<p>Please review your submission. Once you\'ve finished, please click "Sub
|
||||
// Keep a new image outside the web root until the story is saved;
|
||||
// display.php shows it to this session only. A request that failed the
|
||||
// captcha or the form token keeps nothing.
|
||||
if (is_uploaded_file($_FILES['upload']['tmp_name'] ?? '') &&
|
||||
!isset($validate['upload']) && !isset($validate['captcha']) && !isset($validate['csrf'])) {
|
||||
if (!isset($validate['upload']) && !isset($validate['captcha']) && !isset($validate['csrf']) &&
|
||||
is_string($_FILES['upload']['tmp_name'] ?? '') && is_uploaded_file($_FILES['upload']['tmp_name'] ?? '')) {
|
||||
if (store_upload($_FILES['upload']['tmp_name']))
|
||||
$file_src = pending_upload_url();
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user