Implement URL XSS attack

This commit is contained in:
2024-10-08 14:30:39 +02:00
parent f81e9be320
commit 48bfcc9c75
19 changed files with 243 additions and 61 deletions

View File

@@ -4,4 +4,10 @@ const BASE_URL = "http://localhost:3000/exercises"
export async function getAllExerciseGroups() {
return await axios.get(BASE_URL)
}
export async function updateExercise(exerciseGroupNr: number, exerciseNr: number, state: boolean) {
let url = BASE_URL + "/" + exerciseGroupNr + "/" + exerciseNr + "/" + (state ? "1" : "0")
return await axios.post(url)
}

View File

@@ -13,8 +13,8 @@ export const useShoppingStore = defineStore("shoppingStore", {
events: ref<Array<EventModel>>([]),
cities: ref<Array<CityModel>>([]),
genres: ref<Array<GenreModel>>([]),
cityFilterName: ref<String>(),
genreFilterName: ref<String>()
cityFilterName: ref<string>(),
genreFilterName: ref<string>()
}),
actions: {
@@ -23,8 +23,8 @@ export const useShoppingStore = defineStore("shoppingStore", {
feedbackStore.fetchDataFromServerInProgress = true
await fetchEvents(
this.cityFilterName != null ? this.cityFilterName : "",
this.genreFilterName != null ? this.genreFilterName : ""
this.cityFilterName != null && this.cityFilterName != "undefined" && !this.cityFilterName.startsWith("<") ? this.cityFilterName : "",
this.genreFilterName != null && this.genreFilterName != "undefined" && !this.genreFilterName.startsWith("<") ? this.genreFilterName : ""
)
.then(result => {
this.events = result.data