Implementing exercise 3.2

This commit is contained in:
2024-11-20 14:07:41 +01:00
parent 5eab947b8c
commit 4b4517cc4b
7 changed files with 68 additions and 7 deletions

View File

@@ -52,9 +52,13 @@ watch(() => route.path, () => {
<!-- Logic to check, if exercise 3.1 is solved -->
<div v-for="query in route.query">
<span v-if="String(query).startsWith('<iframe')">
<span v-if="String(query).startsWith('<img src=1 onerror=alert(')">
{{ exerciseStore.solveExercise(3, 1) }}
</span>
<span v-if="String(query).startsWith('<img src=1 onerror=import(')">
{{ exerciseStore.solveExercise(3, 2) }}
</span>
</div>
</v-col>
</v-row>

View File

@@ -10,6 +10,10 @@ function navigate() {
router.push(newPath)
}
function refreshPage() {
window.location.reload()
}
watch(() => router.currentRoute.value.fullPath, () => {
path.value = "https://www.eventmaster.com" + router.currentRoute.value.fullPath
})
@@ -61,7 +65,7 @@ watch(() => router.currentRoute.value.fullPath, () => {
<v-btn
density="comfortable"
icon="mdi-refresh"
@click="router.replace({ path: router.currentRoute.value.fullPath })"
@click="refreshPage()"
/>
</v-col>