-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
First of all, thanks for the amazing work done with the image.
Abstract
The problem encountered is that if a password with either @ or $ or both is provided, the login will always fail because the password is not escaped.
How to reproduce
Setup a docker-compose with a service like this one (and, of course, an mssql instance):
mssql-backup:
image: bbtsoftwareag/mssql-backup
container_name: mssql-backup
environment:
- TZ=Europe/Rome
- BACKUP_CLEANUP=true
- BACKUP_AGE=${BACKUP_AGE}
- DB_SERVER=someserver
- DB_USER=SA
- DB_PASSWORD=${DATABASE_PASSWORD}
- "DB_NAMES=
Somedatabase"
- CRON_SCHEDULE=${DATABASE_BACKUP_CRON}
volumes:
- ${DATABASE_BACKUP_MOUNT_PATH}:/backup
networks:
- somenetwork
Create a .env file with the following content:
DATABASE_PASSWORD=XanAm@zing$password
DATABASE_BACKUP_CRON=*/30 5-20 * * 1-6
DATABASE_BACKUP_MOUNT_PATH=./database-backups
BACKUP_AGE=180
Run compose up: the backup will fail with error "Login failed for user ".
The solutions are either to don't use @ and $ in a password, either escape them in some way
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels