Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: setting a password containing either $ or @ will not login #44

Open
briosheje opened this issue Apr 13, 2021 · 1 comment
Open

Comments

@briosheje
Copy link

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

@christianbumann
Copy link
Member

Hi @briosheje

Thank you for reporting this issue. We will fix this as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants