Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3572

Maxscale 2.5 not handle single quotes via mysql client throw incorrect "Access denied error"

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 2.5.10, 2.5
    • N/A
    • N/A

    Description

      Connecting via mysql client, where the arguments will be wrapped into backticks leads to not valid
      "Access not ednied "error.

      To reproduce:

      Use docker-.compose setup

      https://github.com/mariadb-corporation/maxscale-docker

      Change maxscale version in docker-compose.yml from 2.4 to 2.5

      With backticks... it throws an error

      ~/mt2/maxscale-docker/maxscale$ mysql -u maxuser -h'127.0.0.1' -p'maxpwd' -P4006 -D'test'
      ERROR 1045 (28000): Access denied for user 'maxuser'@'::ffff:192.168.112.1' (using password: YES)
      

      Without backticks, it works without issue.

      ~/mt2/maxscale-docker/maxscale$ mysql -u maxuser -h127.0.0.1 -pmaxpwd -P4006 -Dtest
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 4
      Server version: 10.3.5-MariaDB-10.3.5+maria~jessie-log mariadb.org binary distribution
      

      Note:

      It works with 22.4 without issue also with backticks.

      Attachments

        Issue Links

          Activity

            markus makela markus makela added a comment -

            Can you verify that this happens outside of docker? This seems like shell escaping problems.

            markus makela markus makela added a comment - Can you verify that this happens outside of docker? This seems like shell escaping problems.

            markus makela

            Yes, reproduced it with vagrant, mariadb 10.5.10 and maxscale 2.5.13

            [root@centos etc]# mysql -u maxscale -h'127.0.0.1' -p'maxscale_pw' -P4006 -D'test'
            ERROR 1045 (28000): Access denied for user 'maxscale'@'::ffff:127.0.0.1' (using password: YES)
            [root@centos etc]# mysql -u maxscale -h'127.0.0.1' -p'maxscale_pw'  -D'test'
            Welcome to the MariaDB monitor.  Commands end with ; or \g.
            Your MariaDB connection id is 44
            Server version: 10.5.10-MariaDB MariaDB Server
             
            Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
             
            Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
            
            

            Richard Richard Stracke added a comment - markus makela Yes, reproduced it with vagrant, mariadb 10.5.10 and maxscale 2.5.13 [root @centos etc]# mysql -u maxscale -h '127.0.0.1' -p 'maxscale_pw' -P4006 -D 'test' ERROR 1045 ( 28000 ): Access denied for user 'maxscale' @ '::ffff:127.0.0.1' (using password: YES) [root @centos etc]# mysql -u maxscale -h '127.0.0.1' -p 'maxscale_pw' -D 'test' Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 44 Server version: 10.5 . 10 -MariaDB MariaDB Server   Copyright (c) 2000 , 2018 , Oracle, MariaDB Corporation Ab and others.   Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
            markus makela markus makela added a comment -

            I still cannot reproduce this:

            mysql -u bob -p'bob' -h 127.0.0.1 -P 4006 -D t1 -e "show grants;show databases;"
            +----------------------------------------------------------------------------------------------------+
            | Grants for bob@%                                                                                   |
            +----------------------------------------------------------------------------------------------------+
            | GRANT USAGE ON *.* TO `bob`@`%` IDENTIFIED BY PASSWORD '*61584B76F6ECE8FB9A328E7CF198094B2FAC55C7' |
            | GRANT ALL PRIVILEGES ON `t1`.* TO `bob`@`%`                                                        |
            +----------------------------------------------------------------------------------------------------+
            +--------------------+
            | Database           |
            +--------------------+
            | information_schema |
            | t1                 |
            | test               |
            +--------------------+
            

            Tested with the upcoming MaxScale 2.5.14 and MariaDB 10.5.10.

            Please provide exact steps to verify this.

            markus makela markus makela added a comment - I still cannot reproduce this: mysql -u bob -p'bob' -h 127.0.0.1 -P 4006 -D t1 -e "show grants;show databases;" +----------------------------------------------------------------------------------------------------+ | Grants for bob@% | +----------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO `bob`@`%` IDENTIFIED BY PASSWORD '*61584B76F6ECE8FB9A328E7CF198094B2FAC55C7' | | GRANT ALL PRIVILEGES ON `t1`.* TO `bob`@`%` | +----------------------------------------------------------------------------------------------------+ +--------------------+ | Database | +--------------------+ | information_schema | | t1 | | test | +--------------------+ Tested with the upcoming MaxScale 2.5.14 and MariaDB 10.5.10. Please provide exact steps to verify this.

            People

              Unassigned Unassigned
              Richard Richard Stracke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.