Skip to content

Commit

Permalink
Merge pull request #404 from bcgov/removesonarsecurityhotspots
Browse files Browse the repository at this point in the history
added sanitize
  • Loading branch information
michaeltangbcgov authored Feb 14, 2023
2 parents 3c0202a + 079d72b commit e7683c4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
11 changes: 11 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@bcgov/bootstrap-theme": "https://github.com/bcgov/bootstrap-theme/releases/download/v1.1.3/bcgov-bootstrap-theme-1.1.3.tgz",
"@braintree/sanitize-url": "^6.0.2",
"@fortawesome/fontawesome-free": "^5.15.3",
"@vuejs-community/vue-filter-date-format": "^1.6.3",
"@vuejs-community/vue-filter-date-parse": "^1.1.6",
Expand Down Expand Up @@ -43,4 +44,4 @@
"eslint-plugin-vue": "^5.0.0",
"vue-template-compiler": "^2.6.10"
}
}
}
8 changes: 6 additions & 2 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { mapActions, mapMutations, mapGetters, mapState } from "vuex";
import Bcheader from "@/components/BCHeader";
import BCFooter from "@/components/BCFooter";
import sanitizeUrl from "@braintree/sanitize-url";
import EnvironmentBanner from "@/components/EnvironmentBanner";
import { Routes } from "@/utils/constants";
export default {
Expand All @@ -44,8 +45,8 @@ export default {
},
data() {
return {
login: Routes.LOGIN,
userLogout: Routes.LOGOUT,
login: "",
userLogout: "",
host: location.protocol + "//" + location.host,
};
},
Expand All @@ -70,6 +71,9 @@ export default {
...mapActions("useraccess", ["userAccess"]),
},
async created() {
this.login = sanitizeUrl(Routes.LOGIN);
this.userLogout = sanitizeUrl(Routes.LOGOUT);
this.getJwtToken()
.then(() => this.setApplicationVariables())
.catch((e) => {
Expand Down

0 comments on commit e7683c4

Please sign in to comment.