Bug 1019260 - User shouldn't be able to use empty JNDI name ('java:/' or 'java:jboss/')
Summary: User shouldn't be able to use empty JNDI name ('java:/' or 'java:jboss/')
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JCA
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: DR8
: EAP 6.4.0
Assignee: tom.jenkinson
QA Contact: Petr Kremensky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-15 11:30 UTC by Petr Kremensky
Modified: 2019-08-19 12:46 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Kremensky 2013-10-15 11:30:03 UTC
Description of problem:
 Currently the only validation for JNDI names is: JNDI name has to start with 'java:/' or 'java:jboss/'. But user is able to enter just 'java:/' or 'java:jboss/' as JNDI name. Using this JNDI name for eg. data-source will lead to java.lang.IllegalArgumentException: Empty name segment is not allowed for jboss. Further more this data-source cannot be removed (expect deleting from XML directly).


Version-Release number of selected component (if applicable):
 EAP 6.2.0.ER5

How reproducible:
 Always

Steps to Reproduce:
 1. Start out-of-box EAP 
 2. Connect to EAP eg. via web console
 3. Add a new Datasource (use 'java:/' or 'java:jboss/' as JNDI name)
 4. Enable the datasource

Actual results:
13:26:02,708 ERROR [org.jboss.as.controller.management-operation] (HttpManagementService-threads - 2) JBAS014612: Operation ("enable") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "test")
]): java.lang.IllegalArgumentException: Empty name segment is not allowed for java

Expected results:
 User is unable to use 'java:/' or 'java:jboss/' as JNDI name.

Comment 1 Jesper Pedersen 2014-09-02 14:02:53 UTC
Corner case, so not a priority

Comment 2 Jeff Zhang 2014-09-24 00:34:10 UTC
https://github.com/wildfly/wildfly/pull/6738
upstream PR sent.

Comment 3 Kabir Khan 2014-11-03 09:53:37 UTC
https://github.com/jbossas/jboss-eap/pull/1871

Comment 4 Petr Kremensky 2014-11-06 07:05:25 UTC
Verified on EAP 6.4.0.DR8


Note You need to log in before you can comment on or make changes to this bug.