summaryrefslogtreecommitdiff
path: root/posthandler.php
diff options
context:
space:
mode:
authorccd0 <admin@containerchan.org>2013-12-09 05:36:26 -0800
committerccd0 <admin@containerchan.org>2013-12-09 05:36:26 -0800
commit84329fb6ff1e06e02be2b2f21a09a28216c3409b (patch)
tree2ba5f0a6388f7ad53d0bd71a3017fa8d89d242e8 /posthandler.php
parent16adc1ff05fa5e6e531c90e0c91b519fe3474a79 (diff)
check that uploads are WebM files
Diffstat (limited to 'posthandler.php')
-rw-r--r--posthandler.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/posthandler.php b/posthandler.php
index f2f60291..639254e1 100644
--- a/posthandler.php
+++ b/posthandler.php
@@ -6,6 +6,7 @@ function postHandler($post) {
if ($post->has_file && $post->extension == 'webm') {
require_once dirname(__FILE__) . '/videodata.php';
$videoDetails = videoData($post->file_path);
+ if (!isset($videoDetails['container']) || $videoDetails['container'] != 'webm') return "not a WebM file";
// Set thumbnail
$thumbName = $board['dir'] . $config['dir']['thumb'] . $post->file_id . '.webm';