From 8849f5a2db1d041df556d069bb0b530aee11294e Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 3 Nov 2010 20:07:32 +1100 Subject: Maximum image dimensions --- post.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'post.php') 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']; -- cgit v1.3