KasperskyLab/TinyCheck

Bad password checks during install

Lain-inrae opened this issue · 1 comments

The install script tests the password with this command:

if [ $password1 = $password2 ]; then
    ...

which fails the equality check if the password contains spaces

Steps to reproduce:

sudo bash install.sh

...

set a password with spaces

Produces:

    Please choose a password for TinyCheck's backend: 
    Please confirm the password: 
install.sh: line 72: [: too many arguments
    [✘] The passwords aren't equal, please retry.

Fix with :

if [ "$password1" = "$password2" ]; then
    ...

Thank you! [https://github.com//pull/140](fixed recently) after your report!