mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #4595 from techAPJ/security
SECURITY: escape advanced search term
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { observes } from 'ember-addons/ember-computed-decorators';
|
import { observes } from 'ember-addons/ember-computed-decorators';
|
||||||
|
import { escapeExpression } from 'discourse/lib/utilities';
|
||||||
|
|
||||||
const REGEXP_BLOCKS = /(([^" \t\n\x0B\f\r]+)?(("[^"]+")?))/g;
|
const REGEXP_BLOCKS = /(([^" \t\n\x0B\f\r]+)?(("[^"]+")?))/g;
|
||||||
|
|
||||||
@@ -103,7 +104,7 @@ export default Em.Component.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
findSearchTerms() {
|
findSearchTerms() {
|
||||||
const searchTerm = this.get('searchTerm');
|
const searchTerm = escapeExpression(this.get('searchTerm'));
|
||||||
if (!searchTerm)
|
if (!searchTerm)
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user