[#2727] - DataSource creation does not accept oracle TNS style descriptors

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

The current validation pattern for JDBC Url's does not accept oracle TNS style descriptors such as:

jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ServiceName)))

This is due to the following missing part of the regular expression (which i believe is defined in the property "Validator.PathWithSpace" in the validation.properties file).

\\p{Ps}\\p{Pe}

In addition, when you enter something that won't match the pattern, you get a very non-descript error in the application:

The server has encountered an error. Please excuse the inconvenience.
An error has occurred. Please contact your system administrator. (5321)

And the following in the logs:

webapps/jasperserver/WEB-INF/logs/jasperserver.log:2013-02-04 08:33:21,476 ERROR Validator,http-8090-3:408 - [SECURITY FAILURE context=connectionUrl-addDataSourceFlow_context, key=reportDataSource.connectionUrl, type(PathWithSpace)=^[\p{L}\p{M}\p{N}\p{Pd}\p{Pc}\p{Po}\p{Pi}\p{Pf}\s\=\:\/\%\.\~\|]*$, input=jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=10.36.3.171)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=APPCEP))), maxLength=15000, isBlacklist=false]

v5.0.1
mattinger_1's picture
Joined: Oct 22 2012 - 12:33pm
Last seen: 7 years 6 months ago

1 Comment:

#1
  • Assigned:nobody»

Fyi: adding the above to the regular expression in the "Validator.PathWithSPace" property allows the TNS style descriptor to be entered. That can be used as workaround.

Feedback
randomness