add rich KML support, mitigate KML vulnerabilities
All checks were successful
pedestrian-simulator / build (push) Successful in 1m0s

This commit is contained in:
2026-01-11 22:48:50 -07:00
parent eaea2c4edb
commit f985d3433d
8 changed files with 705 additions and 34 deletions

View File

@@ -75,6 +75,7 @@ func createTables() {
filename VARCHAR(255),
user_id VARCHAR(255),
distance DOUBLE,
description TEXT,
is_public BOOLEAN DEFAULT FALSE,
uploaded_at DATETIME,
UNIQUE KEY (user_id, filename),
@@ -117,6 +118,8 @@ func createTables() {
// Migrations: Ensure trips table uses TIMESTAMP for sync times (breaking change for DATETIME -> TIMESTAMP)
db.Exec("ALTER TABLE trips MODIFY last_sync_time TIMESTAMP NULL")
db.Exec("ALTER TABLE trips MODIFY next_sync_time TIMESTAMP NULL")
// Migration for KML description
db.Exec("ALTER TABLE kml_metadata ADD COLUMN IF NOT EXISTS description TEXT")
log.Println("Database tables initialized")
}