summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
Diffstat (limited to 'post.php')
-rw-r--r--post.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/post.php b/post.php
index 23eb0453..22aba6af 100644
--- a/post.php
+++ b/post.php
@@ -121,6 +121,11 @@
error(ERR_INVALIDIMG);
}
+ if($post['width'] > MAX_WIDTH || $post['height'] > MAX_HEIGHT) {
+ unlink($post['file']);
+ error(ERR_MAXSIZE);
+ }
+
$post['filesize'] = filesize($post['file']);
$thumb = resize($post['extension'], $post['file'], $post['thumb'], THUMB_WIDTH, THUMB_HEIGHT);
$post['thumbwidth'] = $thumb['width'];