This is an automated email from the ASF dual-hosted git repository.

madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 9480eb996 RANGER-4438: updated to remove leading/trailing quotes in 
property values - #2
9480eb996 is described below

commit 9480eb996f2ebdfe49cd87003c616872ac82da8a
Author: Madhan Neethiraj <[email protected]>
AuthorDate: Thu Nov 30 13:32:45 2023 -0800

    RANGER-4438: updated to remove leading/trailing quotes in property values - 
#2
---
 kms/scripts/setup.sh            | 7 ++++++-
 security-admin/scripts/setup.sh | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/kms/scripts/setup.sh b/kms/scripts/setup.sh
index 8fd51eada..0cce478fd 100755
--- a/kms/scripts/setup.sh
+++ b/kms/scripts/setup.sh
@@ -57,7 +57,12 @@ get_prop_or_default() {
     value=$(echo $validateProperty | cut -d "=" -f2-)
   fi
 
-  echo $value
+  if [[ $1 == *password* ]]
+  then
+    echo $value
+  else
+   echo $value | tr -d \'\"
+ fi
 }
 
 PYTHON_COMMAND_INVOKER=$(get_prop 'PYTHON_COMMAND_INVOKER' $PROPFILE)
diff --git a/security-admin/scripts/setup.sh b/security-admin/scripts/setup.sh
index 64b3ed201..299a093a0 100755
--- a/security-admin/scripts/setup.sh
+++ b/security-admin/scripts/setup.sh
@@ -52,7 +52,12 @@ get_prop_or_default() {
     value=$(echo $validateProperty | cut -d "=" -f2-)
   fi
 
-  echo $value
+  if [[ $1 == *password* ]]
+  then
+    echo $value
+  else
+   echo $value | tr -d \'\"
+ fi
 }
 
 PROPFILE=${RANGER_ADMIN_CONF:-$PWD}/install.properties

Reply via email to