From 690f206a63967805c1d61806683947ac6f2a2175 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 3 Nov 2010 19:44:24 +1100 Subject: Added a maximum filesize for image uploads --- post.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'post.php') diff --git a/post.php b/post.php index a4588d63..23eb0453 100644 --- a/post.php +++ b/post.php @@ -74,6 +74,9 @@ $post['filename'] = $_FILES['file']['name']; $post['has_file'] = $OP || !empty($_FILES['file']['tmp_name']); + if($post['has_file'] && $_FILES['file']['size'] > MAX_FILESIZE) + error(ERR_FILSIZE); + $trip = generate_tripcode($post['name']); $post['name'] = utf8tohtml($trip[0]); $post['trip'] = (isset($trip[1])?$trip[1]:''); -- cgit v1.3