From ac246768aac305715bf21bc5419fbbe27f82c951 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Thu, 4 Jul 2019 00:29:01 +0000 Subject: [PATCH] Bug 23250: Just use an @ in the password Rather than try to use -y and symbols, since older versions of pwgen don't have the -y, Purposefully just shorten the generated password to 15 characters and put @ on the end. This avoids nasty shell globbing, fixes the MySQL requiring a symbol by default in the newer versions. While @ at the end is less secure, the password portion providing security is still 15 characters long. Before patch, password should have potentially multiple ugly symbols in it. After patch, when creating an instance, the password will have an @ at the end of it. --- debian/scripts/koha-create | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index 5e60f7cd77..6551fea3ef 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -579,7 +579,8 @@ if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ] then if [ "$mysqlpwd" = "" ] then - mysqlpwd="$(pwgen -s 16 1)" + mysqlpwd="$(pwgen -s 15 1)" + mysqlpwd="$mysqlpwd@" fi else mysqlpwd="$(getinstancemysqlpassword $name)" -- 2.11.0