mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-30 03:24:47 +00:00
Change the tr character match not to use character classes, since the
user might be operating in a non-UTF-8 character space and could generate a password which can't be inserted.
This commit is contained in:
parent
c87d24aa31
commit
c175a97a94
@ -3,7 +3,7 @@
|
|||||||
# Build the RSCDS database
|
# Build the RSCDS database
|
||||||
#
|
#
|
||||||
|
|
||||||
DBNAME="${1:-rscds}"
|
DBNAME="${1:-davical}"
|
||||||
ADMINPW="${2}"
|
ADMINPW="${2}"
|
||||||
|
|
||||||
DBADIR="`dirname \"$0\"`"
|
DBADIR="`dirname \"$0\"`"
|
||||||
@ -39,7 +39,7 @@ fi
|
|||||||
if [ "$ADMINPW" = "" ] ; then
|
if [ "$ADMINPW" = "" ] ; then
|
||||||
# OK. They didn't supply one, and pwgen didn't work, so we hack something
|
# OK. They didn't supply one, and pwgen didn't work, so we hack something
|
||||||
# together from /dev/random ...
|
# together from /dev/random ...
|
||||||
ADMINPW="`dd if=/dev/urandom bs=512 count=1 2>/dev/null | tr -c -d "[:alnum:]" | cut -c2-9`"
|
ADMINPW="`dd if=/dev/urandom bs=512 count=1 2>/dev/null | tr -c -d "a-zA-HJ-NP-Y0-9" | cut -c2-9`"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ADMINPW" = "" ] ; then
|
if [ "$ADMINPW" = "" ] ; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user