Open briosheje opened 3 years ago
First of all, thanks for the amazing work done with the image.
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.
@
$
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:
.env
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
Hi @briosheje
Thank you for reporting this issue. We will fix this as soon as possible.
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):
Create a
.env
file with the following content: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