Merge pull request #4595 from techAPJ/security
SECURITY: escape advanced search term
This commit is contained in:
commit
1b76e82600
|
@ -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 [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue