Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

see https://github.com/postfixadmin/postfixadmin/issues/527 - try and… #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DavidGoodwin
Copy link
Member

… make it easier to specify a setup_password

@DavidGoodwin
Copy link
Member Author

i'm too stupid to know how to fix it, so it doesn't error on :

docker run -e POSTFIXADMIN_SETUP_PASSWORD_CLEAR_TEXT=foo\'barbaz .....

gives e.g.

+ tmp='foo'\''barbaz'
+ '[' 'foo'\''barbaz' '!=' changeme ']'
+ echo 'Hashing password .... '
Hashing password .... 
++ php -r 'echo password_hash('\''foo'\''barbaz'\'', PASSWORD_DEFAULT); '
+ POSTFIXADMIN_SETUP_PASSWORD='
Parse error: syntax error, unexpected '\''barbaz'\'' (T_STRING), expecting '\'')'\'' in Command line code on line 1'

@J0WI
Copy link
Collaborator

J0WI commented Dec 3, 2022

It works for me if you quote the input: POSTFIXADMIN_SETUP_PASSWORD_CLEAR_TEXT="foo\'barbaz". php -r interprets the \ so the actual hased string is foo'barbaz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants