ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gautam Borad" <gbo...@gmail.com>
Subject Review Request 40858: RANGER-758 : Handle special characters in passwords starting from -r
Date Wed, 02 Dec 2015 13:48:56 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for ranger, Alok Lal, Don Bosco Durai, Abhay Kulkarni, Madhan Neethiraj, Ramesh
Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.

Bugs: RANGER-758

Repository: ranger


**Current Issue :**

Jisql sends argument list to jopt library to parse them according to provided keys, jopt library
assume that if argument start with '-' then its a key, Otherwise it is a value of previous
key. If password values start with '-' then jopt thinks that this is a key field, which is
not actually, Further jopt could not figure out that argument in passed keys list, and fail
to parse further assuming that provided argument list violates the contract.

**Proposed Solution:**
If password key is found in argument list then it is assumed that password shall be in the
next argument, So I can keep a copy of password value in a String object and pass the argument
list with blank password value to jopt library. Once parsing is finished at jopt end and parsed
object is received at called jisql code location then we can continue using actual password
value which we stored earlier in the String object.


  jisql/src/main/java/org/apache/util/sql/Jisql.java cf7563c 

Diff: https://reviews.apache.org/r/40858/diff/


**Steps Performed with patch:**
a) Configured db_password=-ran*ger_$admin+ in instll.properties.
b) Run the setup script 

Ranger installation finished without any error.
Ranger login was working.


Gautam Borad

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message