Merge pull request #399 from Diftraku/ouroboros_api

Special chars in tags barf filter_var
This commit is contained in:
Jeff Genovy 2014-04-09 22:33:05 -04:00
commit 3a0da5df5a

View file

@ -387,9 +387,11 @@ class OuroborosAPI extends Extension
// @TODO Should move the validation logic into OuroborosPost instead?
if ($user->can("create_image")) {
$post = array(
'tags' => !empty($_REQUEST['post']['tags']) ? filter_var(
urldecode($_REQUEST['post']['tags']),
FILTER_SANITIZE_STRING
'tags' => !empty($_REQUEST['post']['tags']) ? Tag::implode(
array_map(
array('Tag', 'sanitise'),
Tag::explode(urldecode($_REQUEST['post']['tags']))
)
) : 'tagme',
'file' => !empty($_REQUEST['post']['file']) ? filter_var(
$_REQUEST['post']['file'],