Maximum image dimensions

This commit is contained in:
Savetheinternet 2010-11-03 20:07:32 +11:00
parent 690f206a63
commit 8849f5a2db
2 changed files with 10 additions and 1 deletions

View file

@ -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'];