Skip to content

Commit

Permalink
Encode user-controlled query params
Browse files Browse the repository at this point in the history
  • Loading branch information
petterhj committed Aug 28, 2023
1 parent b6a228f commit a823d5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/views/Item/ItemOKRs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@

<script>
import { mapGetters, mapState, mapActions } from 'vuex';
import { firestoreEncode } from '@/util/firebaseUtil';
import { PktButton } from '@oslokommune/punkt-vue2';
import routerGuard from '@/router/router-guards/itemOKRs';
import PaneLayout from '@/components/layout/PaneLayout.vue';
Expand Down Expand Up @@ -190,7 +191,7 @@ export default {
if (objectiveId) {
if (objectiveId !== this.activeObjective?.id) {
await this.setActiveObjective(objectiveId);
await this.setActiveObjective(firestoreEncode(objectiveId));
}
if (!this.activeObjective) {
this.notFoundState = true;
Expand All @@ -199,7 +200,7 @@ export default {
if (this.activeObjective && keyResultId) {
if (keyResultId !== this.activeKeyResult?.id) {
await this.setActiveKeyResult(keyResultId);
await this.setActiveKeyResult(firestoreEncode(keyResultId));
}
if (!this.activeKeyResult) {
this.notFoundState = true;
Expand Down

0 comments on commit a823d5d

Please sign in to comment.