docker-backuppc icon indicating copy to clipboard operation
docker-backuppc copied to clipboard

Do not create default user if BACKUPPC_WEB_USER is empty

Open morevnaproject opened this issue 6 years ago • 4 comments

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.

morevnaproject avatar Jan 29 '19 05:01 morevnaproject

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.

adferrand avatar Jan 29 '19 13:01 adferrand

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.

morevnaproject avatar Jan 29 '19 13:01 morevnaproject

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.

adferrand avatar Jan 29 '19 13:01 adferrand

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. ^__^"

morevnaproject avatar Jan 30 '19 10:01 morevnaproject