validate input, dummy.
This commit is contained in:
parent
8f37b432f8
commit
e3b891f0b7
|
@ -58,9 +58,12 @@ class PostvideoAction extends Action {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$uri = $_POST['video_uri'];
|
$uri = $_POST['video_uri'];
|
||||||
// XXX: validate your inputs, dummy.
|
$uri = filter_var($uri, FILTER_SANITIZE_URL);
|
||||||
$rend = sprintf('<video src="%s", controls="controls">Sorry, your browser doesn\'t support the video tag.</video>', $uri);
|
$uri = filter_var($uri, FILTER_VALIDATE_URL);
|
||||||
Notice::saveNew($this->user->id, 'video : ' . $uri, 'web', array('rendered' => $rend));
|
if($uri) {
|
||||||
|
$rend = sprintf('<video src="%s", controls="controls">Sorry, your browser doesn\'t support the video tag.</video>', $uri);
|
||||||
|
Notice::saveNew($this->user->id, 'video : ' . $uri, 'web', array('rendered' => $rend));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showContent()
|
function showContent()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user