Merge pull request #399 from Diftraku/ouroboros_api
Special chars in tags barf filter_var
This commit is contained in:
commit
3a0da5df5a
1 changed files with 5 additions and 3 deletions
|
@ -387,9 +387,11 @@ class OuroborosAPI extends Extension
|
||||||
// @TODO Should move the validation logic into OuroborosPost instead?
|
// @TODO Should move the validation logic into OuroborosPost instead?
|
||||||
if ($user->can("create_image")) {
|
if ($user->can("create_image")) {
|
||||||
$post = array(
|
$post = array(
|
||||||
'tags' => !empty($_REQUEST['post']['tags']) ? filter_var(
|
'tags' => !empty($_REQUEST['post']['tags']) ? Tag::implode(
|
||||||
urldecode($_REQUEST['post']['tags']),
|
array_map(
|
||||||
FILTER_SANITIZE_STRING
|
array('Tag', 'sanitise'),
|
||||||
|
Tag::explode(urldecode($_REQUEST['post']['tags']))
|
||||||
|
)
|
||||||
) : 'tagme',
|
) : 'tagme',
|
||||||
'file' => !empty($_REQUEST['post']['file']) ? filter_var(
|
'file' => !empty($_REQUEST['post']['file']) ? filter_var(
|
||||||
$_REQUEST['post']['file'],
|
$_REQUEST['post']['file'],
|
||||||
|
|
Reference in a new issue