diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-03 19:44:24 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-03 19:44:24 +1100 |
| commit | 690f206a63967805c1d61806683947ac6f2a2175 (patch) | |
| tree | 8827df646be8e50a7e10dd6a65d111b72fc89db2 /post.php | |
| parent | 0b50ef702f46441d151cba1dfd9c373352178e20 (diff) | |
Added a maximum filesize for image uploads
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -74,6 +74,9 @@ $post['filename'] = $_FILES['file']['name'];
$post['has_file'] = $OP || !empty($_FILES['file']['tmp_name']);
+ if($post['has_file'] && $_FILES['file']['size'] > MAX_FILESIZE)
+ error(ERR_FILSIZE);
+
$trip = generate_tripcode($post['name']);
$post['name'] = utf8tohtml($trip[0]);
$post['trip'] = (isset($trip[1])?$trip[1]:'');
|
