Skip to content

Commit

Permalink
Merge pull request #3919 from aydreeihn/issue/advanced_search_xss
Browse files Browse the repository at this point in the history
Format the advanced search title so that it will not allow javascript
  • Loading branch information
protich committed Sep 14, 2017
2 parents c26b11c + 8132c13 commit ebe1953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/ajax.search.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function _saveSearch($search) {

$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()) {
Expand Down

0 comments on commit ebe1953

Please sign in to comment.