Skip to content

Commit

Permalink
Merge pull request #59 from blockapps/vvv
Browse files Browse the repository at this point in the history
Fail verbosely when no password can be read
  • Loading branch information
nikitamendelbaum authored Jul 31, 2019
2 parents e6d7c09 + bae1b03 commit 5f7396b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# STRATO Getting Started release notes

## 2.10.1

STRATO versions supported: v4.0+

- Fail verbosely when no password can be read

## 2.10.0

STRATO versions supported: v4.0+
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.10.0
2.10.1
6 changes: 4 additions & 2 deletions strato
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ function setPassword {
while [ -z $PASSWORD ]; do
echo
echo -n Please enter a password:
read -s PASSWORDA
read -s PASSWORDA || (printf "\nerror: unable to read password, stdin might be closed\n" &&
printf "Set the PASSWORD environment variable in automated environments\n" &&
exit 18)
echo
echo -n Please re-enter the password:
read -s PASSWORDB
Expand All @@ -165,7 +167,7 @@ function setPassword {
echo -n Passwords did not match. Please try again.
fi
done

PASSWORD_SET_RESPONSE=$(docker exec -i strato_vault-wrapper_1 curl -s -H "Content-Type: application/json" -d @- localhost:8000/strato/v2.3/password <<< \"$PASSWORD\")
case ${PASSWORD_SET_RESPONSE} in
"\"Could not validate password\"" )
Expand Down

0 comments on commit 5f7396b

Please sign in to comment.