You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2023/01/04 16:11:38 UTC
[karaf] branch karaf-4.3.x updated: Restrict JNDI name in JDBCUtils
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch karaf-4.3.x
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/karaf-4.3.x by this push:
new 834e0f387e Restrict JNDI name in JDBCUtils
834e0f387e is described below
commit 834e0f387ec561e54f664a1ff0a5226038e75507
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Wed Jan 4 17:10:52 2023 +0100
Restrict JNDI name in JDBCUtils
(cherry picked from commit 381df11fa22b46db0a333b1d0f387849a319de9c)
---
.../src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java
index c5f76dad19..eb07b2bc0a 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java
@@ -63,7 +63,7 @@ public final class JDBCUtils {
// secure JNDI scheme
URI uri = new URI(jndiName);
String scheme = uri.getScheme();
- if (scheme == null || scheme.equals("java")) {
+ if (scheme == null || !scheme.equals("java")) {
throw new Exception("Unsupported JNDI URI: " + jndiName);
}
InitialContext ic = new InitialContext();