summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-11-03 20:07:32 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2010-11-03 20:07:32 +1100
commit8849f5a2db1d041df556d069bb0b530aee11294e (patch)
tree5dbad2fee94f195f82fa1eb93ba1b13fe61b87c1 /post.php
parent690f206a63967805c1d61806683947ac6f2a2175 (diff)
Maximum image dimensions
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'];