Explorar o código

Fix incorrect sanitisation of search queries on list/campaign frontend.

Kailash Nadh hai 1 ano
pai
achega
06b4494200
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      frontend/src/views/Campaigns.vue
  2. 1 1
      frontend/src/views/Lists.vue

+ 1 - 1
frontend/src/views/Campaigns.vue

@@ -347,7 +347,7 @@ export default Vue.extend({
     getCampaigns() {
     getCampaigns() {
       this.$api.getCampaigns({
       this.$api.getCampaigns({
         page: this.queryParams.page,
         page: this.queryParams.page,
-        query: this.queryParams.query,
+        query: this.queryParams.query.replace(/[^\p{L}\p{N}\s]/gu, ' '),
         order_by: this.queryParams.orderBy,
         order_by: this.queryParams.orderBy,
         order: this.queryParams.order,
         order: this.queryParams.order,
       });
       });

+ 1 - 1
frontend/src/views/Lists.vue

@@ -231,7 +231,7 @@ export default Vue.extend({
     getLists() {
     getLists() {
       this.$api.queryLists({
       this.$api.queryLists({
         page: this.queryParams.page,
         page: this.queryParams.page,
-        query: this.queryParams.query.replace(/[^\p{L}\p{N}\s]/gu, ''),
+        query: this.queryParams.query.replace(/[^\p{L}\p{N}\s]/gu, ' '),
         order_by: this.queryParams.orderBy,
         order_by: this.queryParams.orderBy,
         order: this.queryParams.order,
         order: this.queryParams.order,
       }).then((resp) => {
       }).then((resp) => {