]> git.koha-community.org Git - koha.git/commit
Bug 25622: Use special chars in DB password (koha-create)
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 29 May 2020 14:10:58 +0000 (16:10 +0200)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Fri, 12 Aug 2022 07:30:43 +0000 (09:30 +0200)
commitcf6641b763e7395f9a60f4a1974c8771a4359abd
tree14be5382c73d8670e5fa4f02cdc28c5ec0d39687
parent718ef54855db04191b3b460ef3ab7c574d5b6208
Bug 25622: Use special chars in DB password (koha-create)

On bug 23250 we decided to generate a password without special chars
then add a '@' at the end to comply with MySQL policy.
That is wrong, we should handle correctly the special chars we don't
want to be part of the password.

Test plan:
1.
mysqlpwd=$(pwgen -s -y -r ":'&\\<>/" 16 1)
echo $mysqlpwd

Confirm that you don't see one of the following chars : ' & \ < > /

2.
Copy from src and edit /usr/sbin/koha-create to add an echo $mysqlpwd
Create several instances, like:
koha-create --create-db x
koha-create --create-db xx
koha-create --create-db xxx
...

When you see a password with a special chars, do:
koha-shell xxx
grep '<pass>' $KOHA_CONF
And make sure the password does not contain "__DB_PASS__"

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ffd3b4b7e391d40c476772bd16530572431d2896)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 026c7588d93719217cea68a309f481f9c6604c30)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
debian/scripts/koha-create