XSS for eml and others (#5967)

This commit is contained in:
Anthony Stirling
2026-03-20 11:55:23 +00:00
committed by GitHub
parent 55bcb92810
commit 9e8606cab4
4 changed files with 27 additions and 7 deletions
@@ -488,14 +488,14 @@ public class DatabaseService implements DatabaseServiceInterface {
private void executeDatabaseScript(Path scriptPath) {
if (isH2Database()) {
// Validate SQL content BEFORE execution to prevent injection attacks
validateSqlContent(scriptPath);
if (!verifyBackup(scriptPath)) {
log.error("Backup verification failed for: {}", scriptPath);
throw new IllegalArgumentException("Backup verification failed for: " + scriptPath);
}
// Validate SQL content before execution to prevent injection attacks
validateSqlContent(scriptPath);
String query = "RUNSCRIPT from ?;";
try (Connection conn = dataSource.getConnection();