diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-10 22:31:08 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-10 22:31:08 +1000 |
| commit | c544ad9bb8c034eee1213991aac1cd2213a05d10 (patch) | |
| tree | bed0b9beae7add72617bafb0e88649494210485d /post.php | |
| parent | 406d287cd123a7de59e32f0b50c76525e1a28eda (diff) | |
Block files exploiting IE's mime-sniffing 'feature'
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -407,6 +407,13 @@ error($config['error']['maxsize']); } + // Check IE MIME type detection XSS exploit + $buffer = file_get_contents($post['file'], null, null, null, 255); + if(preg_match($config['ie_mime_type_detection'], $buffer)) { + undoImage($post); + error($config['error']['mime_exploit']); + } + $post['filehash'] = $config['file_hash']($post['file']); $post['filesize'] = filesize($post['file']); |
