gene-git / nginx_passwd

Basic Auth Password File Manager for nginx
MIT License
4 stars 0 forks source link

script accepts no user on input and writes None inside file #4

Closed solsticedhiver closed 7 months ago

solsticedhiver commented 7 months ago

There is no check on input of the script, and you can provide no user.

Then, the script writes one entry, and the user is written as 'None'

$ nginx-passwd -f htpasswd 
 Password file not found : htpasswd
Password: 
solstice@rhea:/tmp$ cat htpasswd 
None:$5$rounds=535000$9wmuZuA3fV0QD7Go$44.v/6kE5m4.ZIqjk4opR0UnyxoCrp4GQn0tWdiMFO1

The script should check if user in input is empty or not, and error out on empty user ?

gene-git commented 7 months ago

Agree - thanks for bringing this one up too.

gene-git commented 7 months ago

Fixed in release 2.5.0