arnabnandy7 opened a new pull request, #1159: URL: https://github.com/apache/ranger/pull/1159
## What changes were proposed in this pull request? This pull request addresses RANGER-5631, where setup scripts fail when passwords contain `%` or `\`. The proposed changes: - Disable `ConfigParser` interpolation in the UserSync, TagSync, and Ranger Admin upgrade scripts so `%` is treated as a literal character. - Allow backslashes in Ranger Admin database passwords while retaining restrictions on quotes and backticks, which remain unsafe in existing shell and SQL interpolation paths. - Use `shlex.quote()` when adding database usernames and passwords to Unix Jisql commands. - Apply the Jisql handling consistently across MySQL, Oracle, PostgreSQL, SQL Server, and SQL Anywhere paths in `dba_script.py` and `db_setup.py`. - Preserve the existing Windows command construction behavior. ## How was this patch tested? The following lightweight local tests were performed: - Parsed all modified Python files to verify syntax. - Verified that a property value containing `%`, such as `Test%Pass1`, is read literally with ConfigParser interpolation disabled. - Verified that passwords containing `%` and `\` round-trip unchanged through the Unix `shlex.quote()` and `shlex.split()` command-building path. - Invoked the Ranger Admin password-validation entry point and confirmed that `Test\Pass1` is accepted. - Ran `git diff --check` successfully. Database integration tests were not run locally. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
