Skip to content

[issue] entrypoint script does not escape password properly #183

Closed
@Celmor

Description

@Celmor
Type Version/Name
MARIADB_VERSION 1:10.3.8+maria~jessie
Docker Image mariadb:10.3.8@sha256:f2085c2176ba6294cf73033b344a420faa2ddae1b97b6795c101552e86284ba3
Docker Hosts Kernel Version 4.17.0-2-MANJARO
Docker Server Version 18.05.0-ce

Description

I've generated my password for MYSQL_ROOT_PASSWORD env var with keepass with all character ranges enabled. The container exits with

ERROR 1064 (42000) at line 6: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Oe(]xI=<&(') ;
GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ;
CREATE' at line 1

Full log
where 'Oe(]xI=<&( was part of my MYSQL_ROOT_PASSWORD.

Steps to reproduce

Run sudo docker run --rm -e "MYSQL_ROOT_PASSWORD='Oe(]xI=<&(" mariadb:10.3.8@sha256:f2085c2176ba6294cf73033b344a420faa2ddae1b97b6795c101552e86284ba3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions