Bug 1019260 - User shouldn't be able to use empty JNDI name ('java:/' or 'java:jboss/')
User shouldn't be able to use empty JNDI name ('java:/' or 'java:jboss/')
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JCA (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity low
: DR8
: EAP 6.4.0
Assigned To: tom.jenkinson
Petr Kremensky
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-15 07:30 EDT by Petr Kremensky
Modified: 2017-10-09 20:26 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Kremensky 2013-10-15 07:30:03 EDT
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 10:02:53 EDT
Corner case, so not a priority
Comment 2 Jeff Zhang 2014-09-23 20:34:10 EDT
https://github.com/wildfly/wildfly/pull/6738
upstream PR sent.
Comment 3 Kabir Khan 2014-11-03 04:53:37 EST
https://github.com/jbossas/jboss-eap/pull/1871
Comment 4 Petr Kremensky 2014-11-06 02:05:25 EST
Verified on EAP 6.4.0.DR8

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