aboutsummaryrefslogtreecommitdiffstats
path: root/packages/policy-xacmlpdp-tarball
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2022-11-01 17:33:43 +0000
committerGerrit Code Review <gerrit@onap.org>2022-11-01 17:33:43 +0000
commitb7e8af08838772ee82ef997a2f5fe92fc5d3901e (patch)
treeb794ee9ba1641a0d6b98b59472544d3edf0af574 /packages/policy-xacmlpdp-tarball
parentc7b9c9b4ae910b6cf2fc57d55b1d82a4779b5674 (diff)
parentbb7d3828707bcdba59903fc979b87e3824ac6626 (diff)
Merge "Fix mishandling of special characters in passwords"
Diffstat (limited to 'packages/policy-xacmlpdp-tarball')
-rw-r--r--packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh2
-rw-r--r--packages/policy-xacmlpdp-tarball/src/main/resources/postgres/bin/create-guard-table-pg.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh b/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh
index 85350c46..33e67977 100644
--- a/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh
+++ b/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh
@@ -38,7 +38,7 @@ fi
# Extract Maria DB Credential properties from xacml.properties file
DB_HOSTNAME=$(awk -F[/:] '$1 == "javax.persistence.jdbc.url=jdbc" { print $3 $5 }' /tmp/temp.xacml.properties)
DB_USERNAME=$(awk -F= '$1 == "javax.persistence.jdbc.user" { print $2 }' /tmp/temp.xacml.properties)
-DB_PASSWORD=$(awk -F= '$1 == "javax.persistence.jdbc.password" { print $2 }' /tmp/temp.xacml.properties)
+DB_PASSWORD=$(awk -F= '$1 == "javax.persistence.jdbc.password" { st = index($0,"="); print substr($0,st+1) }' /tmp/temp.properties)
# Remove temp file
rm /tmp/temp.xacml.properties
diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/postgres/bin/create-guard-table-pg.sh b/packages/policy-xacmlpdp-tarball/src/main/resources/postgres/bin/create-guard-table-pg.sh
index bb2f2034..b8fba4ed 100644
--- a/packages/policy-xacmlpdp-tarball/src/main/resources/postgres/bin/create-guard-table-pg.sh
+++ b/packages/policy-xacmlpdp-tarball/src/main/resources/postgres/bin/create-guard-table-pg.sh
@@ -37,7 +37,7 @@ fi
# Extract Maria DB Credential properties from xacml.properties file
DB_HOSTNAME=$(awk -F[/:] '$1 == "javax.persistence.jdbc.url=jdbc" { print $3 $5 }' /tmp/temp.xacml-pg.properties)
DB_USERNAME=$(awk -F= '$1 == "javax.persistence.jdbc.user" { print $2 }' /tmp/temp.xacml-pg.properties)
-DB_PASSWORD=$(awk -F= '$1 == "javax.persistence.jdbc.password" { print $2 }' /tmp/temp.xacml-pg.properties)
+DB_PASSWORD=$(awk -F= '$1 == "javax.persistence.jdbc.password" { st = index($0,"="); print substr($0,st+1) }' /tmp/temp.properties)
# Remove temp file
rm /tmp/temp.xacml-pg.properties