Skip to content

Commit 8fd59c9

Browse files
chore: reconcile lockfiles for typescript 5.8.3 with latest main deps
2 parents c6861b1 + e73f8ed commit 8fd59c9

7 files changed

Lines changed: 168 additions & 111 deletions

File tree

Backend/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
kotlin("jvm") version "2.2.0" apply true
33
kotlin("plugin.spring") version "2.2.0" apply true
44
kotlin("plugin.jpa") version "2.1.10" apply true
5-
id("org.springframework.boot") version "3.5.4"
5+
id("org.springframework.boot") version "3.5.6"
66
id("io.spring.dependency-management") version "1.1.7"
77
id("com.netflix.dgs.codegen") version "8.1.1"
88
id("org.graalvm.buildtools.native") version "0.11.0"
@@ -47,8 +47,8 @@ dependencies {
4747
implementation("com.graphql-java:graphql-java-extended-scalars")
4848

4949
// Web & UI
50-
implementation("org.webjars.npm:htmx.org:2.0.6")
51-
implementation("org.webjars.npm:alpinejs:3.14.9")
50+
implementation("org.webjars.npm:htmx.org:2.0.7")
51+
implementation("org.webjars.npm:alpinejs:3.15.0")
5252
implementation("nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect")
5353

5454
// Utilities

Backend/src/main/resources/templates/images/list.html

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,21 @@ <h5 class="modal-title">Edit OS Image</h5>
305305
}
306306

307307
// Aktualisiert die entsprechende Tabellenzeile
308+
// Helper function to escape HTML special characters
309+
function escapeHtml(str) {
310+
if (typeof str !== 'string') {
311+
if (str === undefined || str === null) return '';
312+
str = String(str);
313+
}
314+
return str
315+
.replace(/&/g, '&amp;')
316+
.replace(/</g, '&lt;')
317+
.replace(/>/g, '&gt;')
318+
.replace(/"/g, '&quot;')
319+
.replace(/'/g, '&#39;')
320+
.replace(/`/g, '&#96;');
321+
}
322+
308323
function updateTableRow(image) {
309324
let row = document.querySelector(`tr[data-id="${image.id}"]`);
310325
if (row) {
@@ -342,24 +357,24 @@ <h5 class="modal-title">Edit OS Image</h5>
342357
// Erstelle die Zellen – hier ein Beispiel
343358
row.innerHTML = `
344359
<td>
345-
<img src="${ image.icon.startsWith('http') ? image.icon : `/images/icons/${image.icon}` }" alt="icon" width="40" height="40" loading="lazy">
360+
<img src="${ image.icon.startsWith('http') ? escapeHtml(image.icon) : `/images/icons/${escapeHtml(image.icon)}` }" alt="icon" width="40" height="40" loading="lazy">
346361
</td>
347-
<td>${image.name}</td>
348-
<td>${image.description}</td>
349-
<td>${image.category?.name || 'No Category'}</td>
362+
<td>${escapeHtml(image.name)}</td>
363+
<td>${escapeHtml(image.description)}</td>
364+
<td>${image.category && image.category.name ? escapeHtml(image.category.name) : 'No Category'}</td>
350365
<td class="text-center">
351366
<div class="form-check form-switch">
352-
<input class="form-check-input status-toggle" type="checkbox" role="switch" ${ image.isEnabled ? 'checked' : '' } data-id="${image.id}" onclick="event.stopPropagation(); updateStatus(this);">
367+
<input class="form-check-input status-toggle" type="checkbox" role="switch" ${ image.isEnabled ? 'checked' : '' } data-id="${escapeHtml(image.id)}" onclick="event.stopPropagation(); updateStatus(this);">
353368
</div>
354369
</td>
355370
<td class="text-center">
356371
<span class="badge ${ image.isAvailable ? 'bg-success' : 'bg-secondary' }">${ image.isAvailable ? 'Yes' : 'No' }</span>
357372
</td>
358-
<td class="text-center">${image.redirectsCount}</td>
373+
<td class="text-center">${escapeHtml(image.redirectsCount)}</td>
359374
<td class="text-center">
360375
<form action="/admin/images/delete" method="post" class="d-inline" onsubmit="return confirm('Are you sure you want to delete?');">
361-
<input type="hidden" name="id" value="${image.id}">
362-
<input type="hidden" name="_csrf" value="${document.querySelector('input[name="_csrf"]').value}">
376+
<input type="hidden" name="id" value="${escapeHtml(image.id)}">
377+
<input type="hidden" name="_csrf" value="${escapeHtml(document.querySelector('input[name="_csrf"]').value)}">
363378
<button type="submit" class="btn btn-sm btn-danger">
364379
<i class="bi bi-trash"></i>
365380
</button>

Backend/src/test/kotlin/org/openhdfpv/angularbackend/OpenHdBackendApplicationTests.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ package org.openhdfpv.angularbackend
22

33
import org.junit.jupiter.api.Test
44
import org.springframework.boot.test.context.SpringBootTest
5+
import org.springframework.test.context.ActiveProfiles
56

67
@SpringBootTest
8+
@ActiveProfiles("test")
79
class OpenHdBackendApplicationTests {
810

911
@Test
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
spring.datasource.url=jdbc:h2:mem:testdb;MODE=PostgreSQL;DB_CLOSE_DELAY=-1
2+
spring.datasource.username=sa
3+
spring.datasource.password=
4+
spring.datasource.driver-class-name=org.h2.Driver
5+
spring.jpa.hibernate.ddl-auto=create-drop
6+
spring.flyway.enabled=false
7+
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
8+
spring.jpa.generate-ddl=true
9+
spring.jpa.defer-datasource-initialization=true
10+
spring.sql.init.mode=never
11+
spring.jpa.show-sql=false
12+
logging.level.org.flywaydb=OFF
13+
14+
# JWT Testwerte
15+
jwt.secret=test-test-test-test-test-test-test-test-test-test-test-test
16+
jwt.expiration=3600000

Frontend/package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
"@ng-bootstrap/ng-bootstrap": "19.0.1",
3131
"@popperjs/core": "^2.11.8",
3232
"apollo-angular": "^11.0.0",
33-
"bootstrap": "^5.3.7",
33+
"bootstrap": "^5.3.8",
3434
"bootstrap-icons": "1.11.3",
3535
"express": "^4.21.2",
3636
"graphql": "^16.11.0",
3737
"rxjs": "~7.8.2",
3838
"tslib": "^2.8.1",
39-
"zone.js": "~0.15.0"
39+
"zone.js": "~0.15.1"
4040
},
4141
"devDependencies": {
4242
"@angular/build": "^20.0.5",

0 commit comments

Comments
 (0)