HBASE-24567 Create release should url-encode all characters when building git uri

By default, `urllib.quote` will skipp over `/` characters, which are
valid for use in passwords.

Signed-off-by: stack <stack@apache.org>
Signed-off-by: Matt Foley <mattf@apache.org>
This commit is contained in:
Nick Dimiduk 2020-06-22 15:22:21 -07:00 committed by GitHub
parent 5a79a1c83c
commit 90b339a4f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -412,8 +412,8 @@ function git_clone_overwrite {
echo "[INFO] clone will be of the gitbox repo for ${PROJECT}."
if [ -n "${ASF_USERNAME}" ] && [ -n "${ASF_PASSWORD}" ]; then
# Ugly!
encoded_username=$(python -c "import urllib; print urllib.quote('''$ASF_USERNAME''')")
encoded_password=$(python -c "import urllib; print urllib.quote('''$ASF_PASSWORD''')")
encoded_username=$(python -c "import urllib; print urllib.quote('''$ASF_USERNAME''', '')")
encoded_password=$(python -c "import urllib; print urllib.quote('''$ASF_PASSWORD''', '')")
GIT_REPO="https://$encoded_username:$encoded_password@${asf_repo}"
else
GIT_REPO="https://${asf_repo}"