Skip to content

Commit

Permalink
Merge pull request #1057 from nscuro/backport-pr-1056
Browse files Browse the repository at this point in the history
Backport: Fix missing URI encoding of tag names
  • Loading branch information
nscuro authored Oct 10, 2024
2 parents 74fc944 + 4fc2033 commit 55fe641
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/views/portfolio/tags/TagList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export default {
template: `
<div>
<b-link v-b-modal="\`taggedProjectListModal-${index}\`">{{ value }}</b-link>
<span v-if="error" class="fa fa-apple"></span>
<tagged-project-list-modal :tag="tagName" :index="index"/>
</div>`,
data() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
mixins: [permissionsMixin],
methods: {
apiUrl: function () {
return `${this.$api.BASE_URL}/${this.$api.URL_TAG}/${this.tag}/notificationRule`;
return `${this.$api.BASE_URL}/${this.$api.URL_TAG}/${encodeURIComponent(this.tag)}/notificationRule`;
},
untag: function (notificationRuleUuids) {
return this.axios.delete(this.apiUrl(), {
Expand Down
2 changes: 1 addition & 1 deletion src/views/portfolio/tags/TaggedPoliciesListModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
mixins: [permissionsMixin],
methods: {
apiUrl: function () {
return `${this.$api.BASE_URL}/${this.$api.URL_TAG}/${this.tag}/policy`;
return `${this.$api.BASE_URL}/${this.$api.URL_TAG}/${encodeURIComponent(this.tag)}/policy`;
},
untag: function (policyUuids) {
return this.axios.delete(this.apiUrl(), {
Expand Down
2 changes: 1 addition & 1 deletion src/views/portfolio/tags/TaggedProjectListModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {
mixins: [bootstrapTableMixin, permissionsMixin],
methods: {
apiUrl: function () {
return `${this.$api.BASE_URL}/${this.$api.URL_TAG}/${this.tag}/project`;
return `${this.$api.BASE_URL}/${this.$api.URL_TAG}/${encodeURIComponent(this.tag)}/project`;
},
untag: function (projectUuids) {
return this.axios.delete(this.apiUrl(), {
Expand Down

0 comments on commit 55fe641

Please sign in to comment.