docker-backuppc
docker-backuppc copied to clipboard
Do not create default user if BACKUPPC_WEB_USER is empty
Problem:
If BACKUPPC_WEB_USER environment variable is empty and we already have some configuration in /etc/backuppc/htpasswd
, then initialization script adds "backuppc" user, which overrides previous admin user.
This PR fixes the problem and eliminates this security problem.
Also I did not catch that it was for the v3 branch. I will also integrate it on v4 once it is merged. Here I maintain my comments, as it will emerge eventually to the current branch.
Actually, I copied this approach from BackupPC v4 (master) branch -
https://github.com/adferrand/docker-backuppc/blob/6f552eb7ef3928be8270cba1e248f5dc68284d02/files/entrypoint.sh#L44-L53
With v4 everything is fine, so when I discovered that problem for v3 I copied the solution.
Tricked by an old PR ... For my defense, I lost PR history at some point. As it is on master, I take on my charge the actions for the comments I made if you want.
Yes, please. Sorry I do not have much time on handling this - just wanted to share the solution with users who possibly hit the same problems as me. ^__^"