forked from leftypol/leftypol
Added a maximum filesize for image uploads
This commit is contained in:
parent
0b50ef702f
commit
690f206a63
2 changed files with 7 additions and 0 deletions
3
post.php
3
post.php
|
@ -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]:'');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue