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:10 UTC
[karaf] branch main updated: Restrict JNDI name in JDBCUtils
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/main by this push:
new 381df11fa2 Restrict JNDI name in JDBCUtils
381df11fa2 is described below
commit 381df11fa22b46db0a333b1d0f387849a319de9c
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Wed Jan 4 17:10:52 2023 +0100
Restrict JNDI name in JDBCUtils
---
.../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();