[MDEV-7414] Debian package installation of MariaDB server fails if a double quotation mark is used on the root password Created: 2015-01-06 Updated: 2022-09-08 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Platform Debian |
| Affects Version/s: | 5.5.41, 10.0.15, 10.2.3 |
| Fix Version/s: | 5.5 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jean Weisbuch | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | debian, packaging | ||
| Environment: |
Debian |
||
| Issue Links: |
|
||||||||
| Description |
|
Package installation of MariaDB server using Debian packages fails if a double quotation mark character (") is used on the root password due to a lack of input sanitization. As a result, the post install script from the mariadb-server-. package will try to run a query such as :
Which is invalid and will throw an incorrect error such as :
The incriminated code is located on mariadb-server-10.0.postinst : https://github.com/ottok/mariadb-10.0/blob/795666b08a79cfc418d9c6e7fac690ccdea41539/debian/mariadb-server-10.0.postinst#L43 Forbidding some special character on the interactive dialog would be a good think (if possible) as using some special characters such as a single quotation mark or a backtick might be problematic at some other points : Another simple solution for this specific bug would be to escape double quotation marks from the $rootpw variable before generating the query at line 41. – This bug was originally reported on IRC by rachie |
| Comments |
| Comment by Andrii Nikitin (Inactive) [ 2016-11-02 ] | ||||||||||||||||||||
|
Verified in 10.2 with latest internal build http://buildbot.askmonty.org/buildbot/builders/kvm-deb-trusty-amd64/builds/3854 | ||||||||||||||||||||
| Comment by Daniel Black [ 2022-01-29 ] | ||||||||||||||||||||
|
There is a fairly rugged form of escaping in https://github.com/MariaDB/mariadb-docker/blob/013d851b19cee4a109c849bb45ae08ce4c974ac4/docker-entrypoint.sh#L266
+
+
|