VeeamHub / applications

This repository contains example scripts for freeze/thaw of applications or for running plugin based backups such as Oracle RMAN or SAP HANA
MIT License
25 stars 17 forks source link

passwords with special characters #12

Open javelina73 opened 1 year ago

javelina73 commented 1 year ago

Describe the bug when using this script with use_credentials and the credentials have special characters it will fail with error "binary operator expected" and the script will exit with error "mysql command has failed (bad credentials?)"

To Reproduce Steps to reproduce the behavior:

  1. create a mysql user account with a password that contains special characters
  2. configure this script with use_credentials using the credentials created in step 1

Expected behavior The prefreeze script should execute successfully regardless of characters in the password.

Desktop (please complete the following information):

Resolution: change the following from: if [ -n $use_credentials ]; then opts="$opts $use_credentials" fi

To:

if [[ -n $use_credentials ]]; then opts="$opts $use_credentials" fi