diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-03 20:07:32 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-03 20:07:32 +1100 |
| commit | 8849f5a2db1d041df556d069bb0b530aee11294e (patch) | |
| tree | 5dbad2fee94f195f82fa1eb93ba1b13fe61b87c1 /post.php | |
| parent | 690f206a63967805c1d61806683947ac6f2a2175 (diff) | |
Maximum image dimensions
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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'];
|
