ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gautam Borad" <gbo...@gmail.com>
Subject Re: Review Request 40858: RANGER-758 : Handle special characters in passwords starting from -r
Date Thu, 03 Dec 2015 04:34:52 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40858/
-----------------------------------------------------------

(Updated Dec. 3, 2015, 4:34 a.m.)


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


Changes
-------

Addressed review comments


Bugs: RANGER-758
    https://issues.apache.org/jira/browse/RANGER-758


Repository: ranger


Description
-------

**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.


Diffs (updated)
-----

  jisql/src/main/java/org/apache/util/sql/Jisql.java 96e6f1d 

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


Testing
-------

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

**Result/Behavior:**
Ranger installation finished without any error.
Ranger login was working.


Thanks,

Gautam Borad


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