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?
|
||||
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'],
|
||||
|
|
Reference in a new issue