Page MenuHomePhabricator

Oracle EZconnect, if supported, conflicts with error message
Closed, ResolvedPublic

Description

Author: andrew

Description:
The installer says "If you are using client libraries 10g or newer you can also use the Easy Connect naming method."

However, when attempting to do so, I encounter

"Invalid database TNS "(my info here)". Use only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_) and dots (.)."

EZconnect usually uses forward slashes, which apparently is not allowed. The EZConnect doc linked to shows many examples using forward slashes, hence my confusion.


Version: 1.20.x
Severity: major

Details

Reference
bz41063

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:51 AM
bzimport set Reference to bz41063.
bzimport added a subscriber: Unknown Object (MLST).

roy wrote:

The validation code does not allow for forward slash (/), thus an Easy Connect string will never be accepted. The validation code should be changed to accept both colon and slash. (Ex. localhost/XE:POOLED).

Problem is in includes/installer/OracleInstaller.php line 90. A quick workaround is to remove line 90 and 91:

} elseif ( !preg_match( '/^[a-zA-Z0-9_\.]+$/', $newValues['wgDBserver'] ) ) {
                     $status->fatal( 'config-invalid-db-server-oracle', $newValues['wgDBserver'] );

roy wrote:

Line numbers in my previous comment relate to version 1.20.2. Correct line number for the validation code in 1.19.2 is line 76.

roy wrote:

In other words, problem still exist in both 1.19.3 and 1.20.2 ;-)

freak wrote:

Just commited a patch for that into review and will be backporting it as soon as it gets aprooved.

Already fixed:
https://gerrit.wikimedia.org/r/#/q/Ie3a0af9801bfdbc9129298be07e1676145a1607a,n,z

For future reference, putting bug report numbers into commit messages welcome.