Skip to content
Snippets Groups Projects
Commit ebe19531 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #3919 from aydreeihn/issue/advanced_search_xss

Format the advanced search title so that it will not allow javascript
parents c26b11ca 8132c138
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ class SearchAjaxAPI extends AjaxController {
$search->config = JsonDataEncoder::encode($form->getState());
if (isset($_POST['name']))
$search->title = $_POST['name'];
$search->title = Format::htmlchars($_POST['name']);
elseif ($search->__new__)
Http::response(400, 'A name is required');
if (!$search->save()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment