[MXS-822] encrypted passwords containing special characters appear to not work Created: 2016-08-04  Updated: 2016-11-14  Resolved: 2016-11-14

Status: Closed
Project: MariaDB MaxScale
Component/s: test
Affects Version/s: 1.4.3
Fix Version/s: 2.0.0

Type: Bug Priority: Major
Reporter: Ben Stillman Assignee: Timofey Turenko
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

RHEL 6 64-bit


Sprint: 2016-20, 2016-21

 Description   

Encrypted passwords which have a special character (such as $) appear to not work to auth to the backend servers.

To reproduce:

  • use maxkeys to create maxscale keys
    maxkeys /var/lib/maxscale
  • create maxscale database user with $ in the password
    grant all privileges on . to 'maxscale'@'localhost' identified by 'aaaaaaaaa$aaaaaaaaaa';
  • use maxpasswd to generate encrypted version of password
    maxpassword /var/lib/maxscale aaaaaaaaa$aaaaaaaaaa
  • use encrypted password in maxscale.cnf
    EED7D82309F2898C7BE84E389D8C70B1
  • restart maxscale
    service maxscale start
  • log into maxadmin and list servers, auth failed
    Auth Error, Down
  • change maxscale database user password to not contain special characters
    set password for 'maxscale'@'localhost' = password('aaaaaaaaaaaaaaaaaaaa');
  • use maxpasswd to generate encrypted version of password
    maxpasswd /var/lib/maxscale aaaaaaaaaaaaaaaaaaaa
  • use encrypted password in maxscale.cnf
    059F56E071BFA3BFDA8FE4C832D8B7E94D2499B099C8BA3ADED096BB298239A1
  • restart maxscale
    service mysql restart
  • log into maxadmin and list servers, auth succeeded and all works
    Master, Running


 Comments   
Comment by Timofey Turenko [ 2016-11-14 ]

Actually it is not a bug:
everything after $ is treated as a bash variable, single quotes fix the problem, please use maxpasswd /var/lib/maxscale 'aaaaaaaaa$aaaaaaaaaa'

Comment by Timofey Turenko [ 2016-11-14 ]

tested with 'aaa$'aaa' - works! test case https://github.com/mariadb-corporation/maxscale-system-test/blob/master/mxs822_maxpasswd.cpp

Generated at Thu Feb 08 04:02:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.