xss in search
This commit is contained in:
parent
4a6b45cf04
commit
31f4d9066b
@ -6,7 +6,7 @@ class Search extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
if(x($_REQUEST,'search'))
|
if(x($_REQUEST,'search'))
|
||||||
\App::$data['search'] = $_REQUEST['search'];
|
\App::$data['search'] = escape_tags($_REQUEST['search']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -46,12 +46,12 @@ class Search extends \Zotlabs\Web\Controller {
|
|||||||
if(x(\App::$data,'search'))
|
if(x(\App::$data,'search'))
|
||||||
$search = trim(\App::$data['search']);
|
$search = trim(\App::$data['search']);
|
||||||
else
|
else
|
||||||
$search = ((x($_GET,'search')) ? trim(rawurldecode($_GET['search'])) : '');
|
$search = ((x($_GET,'search')) ? trim(escape_tags(rawurldecode($_GET['search']))) : '');
|
||||||
|
|
||||||
$tag = false;
|
$tag = false;
|
||||||
if(x($_GET,'tag')) {
|
if(x($_GET,'tag')) {
|
||||||
$tag = true;
|
$tag = true;
|
||||||
$search = ((x($_GET,'tag')) ? trim(rawurldecode($_GET['tag'])) : '');
|
$search = ((x($_GET,'tag')) ? trim(escape_tags(rawurldecode($_GET['tag']))) : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
|
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
|
||||||
|
Reference in New Issue
Block a user