From 8f4709d82e49c947b233cf3ea6814b759da8bd0f Mon Sep 17 00:00:00 2001 From: Ludy Date: Sun, 24 Nov 2024 15:36:53 +0100 Subject: [PATCH] Bump com.h2database:h2 from 2.1.214 to 2.3.232 (#2314) --- build.gradle | 5 ++--- .../SPDF/config/security/SecurityConfiguration.java | 3 ++- .../SPDF/controller/web/DatabaseWebController.java | 4 +++- src/main/resources/application.properties | 2 +- src/main/resources/templates/database.html | 7 ++++--- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 6cead57e..676e8b16 100644 --- a/build.gradle +++ b/build.gradle @@ -145,9 +145,8 @@ dependencies { implementation 'org.springframework.security:spring-security-saml2-service-provider:6.4.1' implementation 'com.unboundid.product.scim2:scim2-sdk-client:2.3.5' - //2.2.x requires rebuild of DB file.. need migration path - runtimeOnly "com.h2database:h2:2.1.214" - // runtimeOnly "com.h2database:h2:2.3.232" + // Don't upgrade h2database + runtimeOnly "com.h2database:h2:2.3.232" constraints { implementation "org.opensaml:opensaml-core" implementation "org.opensaml:opensaml-saml-api" diff --git a/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java b/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java index e65c9f61..57c1d3f2 100644 --- a/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java +++ b/src/main/java/stirling/software/SPDF/config/security/SecurityConfiguration.java @@ -245,7 +245,8 @@ public class SecurityConfiguration { } // Handle SAML - if (applicationProperties.getSecurity().isSaml2Activ()) { + if (applicationProperties.getSecurity().isSaml2Activ() + && applicationProperties.getSystem().getEnableAlphaFunctionality()) { http.authenticationProvider(samlAuthenticationProvider()); http.saml2Login( saml2 -> diff --git a/src/main/java/stirling/software/SPDF/controller/web/DatabaseWebController.java b/src/main/java/stirling/software/SPDF/controller/web/DatabaseWebController.java index 3fd68ad5..5f521b50 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/DatabaseWebController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/DatabaseWebController.java @@ -34,7 +34,9 @@ public class DatabaseWebController { } List backupList = databaseBackupHelper.getBackupList(); - model.addAttribute("systemUpdate", backupList); + model.addAttribute("backupFiles", backupList); + + model.addAttribute("databaseVersion", databaseBackupHelper.getH2Version()); return "database"; } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index fdfb603c..aba201e1 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -35,7 +35,7 @@ spring.mvc.async.request-timeout=${SYSTEM_CONNECTIONTIMEOUTMILLISECONDS:1200000} #spring.thymeleaf.prefix=file:/customFiles/templates/,classpath:/templates/ #spring.thymeleaf.cache=false -spring.datasource.url=jdbc:h2:file:./configs/stirling-pdf-DB;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE +spring.datasource.url=jdbc:h2:file:./configs/stirling-pdf-DB-2.3.232;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE spring.datasource.driver-class-name=org.h2.Driver spring.datasource.username=sa spring.datasource.password= diff --git a/src/main/resources/templates/database.html b/src/main/resources/templates/database.html index 4f6f8a86..1a86a4fc 100644 --- a/src/main/resources/templates/database.html +++ b/src/main/resources/templates/database.html @@ -14,7 +14,7 @@
database - Database Im-/Export + Database Im-/Export

@@ -31,7 +31,7 @@ - + @@ -41,10 +41,11 @@ +
DB-Version

-
+