From 153b751be5a7c06c1e0267339ad39f977f6a5760 Mon Sep 17 00:00:00 2001 From: Aimery Methena <159072740+aimethed@users.noreply.github.com> Date: Wed, 20 Nov 2024 15:38:27 -0500 Subject: [PATCH] fixing to use quoted password (#2413) --- .../athena/connectors/oracle/OracleJdbcConnectionFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/athena-oracle/src/main/java/com/amazonaws/athena/connectors/oracle/OracleJdbcConnectionFactory.java b/athena-oracle/src/main/java/com/amazonaws/athena/connectors/oracle/OracleJdbcConnectionFactory.java index 32d5a0d2a4..cfe488a7ce 100644 --- a/athena-oracle/src/main/java/com/amazonaws/athena/connectors/oracle/OracleJdbcConnectionFactory.java +++ b/athena-oracle/src/main/java/com/amazonaws/athena/connectors/oracle/OracleJdbcConnectionFactory.java @@ -81,7 +81,7 @@ public Connection getConnection(final JdbcCredentialProvider jdbcCredentialProvi password = String.format("\"%s\"", password); } final String secretReplacement = String.format("%s/%s", jdbcCredentialProvider.getCredential().getUser(), - jdbcCredentialProvider.getCredential().getPassword()); + password); derivedJdbcString = secretMatcher.replaceAll(Matcher.quoteReplacement(secretReplacement)); LOGGER.info("derivedJdbcString: " + derivedJdbcString); return DriverManager.getConnection(derivedJdbcString, properties);