Closed TGates71 closed 9 years ago
Special characters like '$' won't work as they are seen by the CLI as variables, not really sure how we can combat this but we can look into it I guess.
Thanks or posting Tom - I can however confirm that this is definitely NOT due to us switching to UTF8,
Makes total sense. Maybe use a protected server-side PHP file to do it or some sort of escaping or set the passed password in a variable it's self? Just some thoughts to kick around.
No, what I'm saying is, that the Linux console interprets the '$' character and others as special characters on the CLI, escaping them in PHP will not help at all as the special characters will be intercepted at the CLI and will never make it to the PHP script behind to get escaped ;)
On 2 February 2015 at 15:50, TGates notifications@github.com wrote:
Makes total sense. Maybe use a protected server-side PHP file to do it or some sort of escaping or set the passed password in a variable it's self? Just some thoughts to kick around.
— Reply to this email directly or view it on GitHub https://github.com/sentora/sentora-core/issues/109#issuecomment-72479845 .
I completely see now... well, it's good to use if you can't login and need to reset pw, then make a better password once logged in. I guess this can be closed then. no need to try and hash it out.
Only when it's wrapped in double quotes will the variable be used
#!/usr/bin/env bash
PARAM='pas$word'
echo "param value will show : $PARAM"
echo 'param value will not show - $PARAM'
Try it from the CLI then Lee, I think you'll be surprised... the CLI is still trying to use strange characters and will need an escape char!
On 2 February 2015 at 20:16, Lee Mc Kay notifications@github.com wrote:
Only when it's wrapped in double quotes will the variable be used
PARAM=password echo "param value will show : $PARAM" echo 'param value will not show - $PARAM'
— Reply to this email directly or view it on GitHub https://github.com/sentora/sentora-core/issues/109#issuecomment-72529286 .
oh right - PHP not BASH. : got cha
Closing this as not much we can do - except i guess wrap the parameter values in double quotes " which may work - this is however a limitation with using the CLI tools.
used setzadmin to make an easier test password, alpha-numeric works, but used special characters like $ did not work.