Implement URL XSS attack

This commit is contained in:
2024-10-08 14:30:39 +02:00
parent 3dd7b1d4c6
commit 41a7cbc9da
19 changed files with 243 additions and 61 deletions

View File

@@ -23,11 +23,13 @@ function confirmPressed() {
max-width="400"
v-model="showDialog"
>
<v-row>
<v-col>
{{ description }}
</v-col>
</v-row>
<v-container>
<v-row>
<v-col>
{{ description }}
</v-col>
</v-row>
</v-container>
<template #actions>
<outlined-button

View File

@@ -0,0 +1,53 @@
<script setup lang="ts">
import { getAllExerciseGroups, updateExercise } from '@/data/api/exerciseApi';
import { ref, watch } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute()
const routeItems = ref(route.path.split('/'))
function solveExerciseXssInUrl() {
updateExercise(3, 1, true)
}
watch(() => route.path, () => {
routeItems.value = route.path.split("/")
routeItems.value = routeItems.value.filter(value => value != "")
for (let item in routeItems.value) {
item.charAt(0).toUpperCase() + item.slice(1)
}
})
</script>
<template>
<v-row>
<v-spacer />
<v-col>
{{ $t('youAreHere') }}
<v-breadcrumbs :items="routeItems">
<template v-slot:title="{ item }">
{{ item.title.charAt(0).toUpperCase() + item.title.slice(1) }}
</template>
<template v-slot:divider>
<v-icon icon="mdi-forward"></v-icon>
</template>
</v-breadcrumbs>
</v-col>
<v-col>
Filter:
<div v-for="query in route.query" v-html="query" />
<div v-for="query in route.query">
<span v-if="String(query).startsWith('<iframe')">
{{ solveExerciseXssInUrl() }}
</span>
</div>
</v-col>
<v-spacer />
</v-row>
</template>