From d5bdf6f8594a3118ee37a0d1b31a067b2f013ab3 Mon Sep 17 00:00:00 2001 From: sebslsch <68557865+sebslsch@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:49:06 +0200 Subject: [PATCH] Fix use of `getPropertyOrFile` for database password Related to DependencyTrack/dependency-track#1987 --- .../main/java/alpine/server/upgrade/UpgradeMetaProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alpine-server/src/main/java/alpine/server/upgrade/UpgradeMetaProcessor.java b/alpine-server/src/main/java/alpine/server/upgrade/UpgradeMetaProcessor.java index 09b05312..5d2aa033 100644 --- a/alpine-server/src/main/java/alpine/server/upgrade/UpgradeMetaProcessor.java +++ b/alpine-server/src/main/java/alpine/server/upgrade/UpgradeMetaProcessor.java @@ -181,7 +181,7 @@ private Connection createConnection() throws UpgradeException { final String driver = Config.getInstance().getProperty(Config.AlpineKey.DATABASE_DRIVER); final String dbUrl = Config.getInstance().getProperty(Config.AlpineKey.DATABASE_URL); final String user = Config.getInstance().getProperty(Config.AlpineKey.DATABASE_USERNAME); - final String password = Config.getInstance().getProperty(Config.AlpineKey.DATABASE_PASSWORD); + final String password = Config.getInstance().getPropertyOrFile(Config.AlpineKey.DATABASE_PASSWORD); try { Class.forName(driver); return DriverManager.getConnection(dbUrl, user, password);