mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-29 13:57:33 +02:00
Merge pull request #1988 from reasonerjt/mysql-escape
escape mysql root password
This commit is contained in:
commit
45b46cb992
@ -13,6 +13,7 @@ if [ ! -d '/var/lib/mysql/mysql' -a "${1%_safe}" = 'mysqld' ]; then
|
|||||||
# These statements _must_ be on individual lines, and _must_ end with
|
# These statements _must_ be on individual lines, and _must_ end with
|
||||||
# semicolons (no line breaks or comments are permitted).
|
# semicolons (no line breaks or comments are permitted).
|
||||||
# TODO proper SQL escaping on ALL the things D:
|
# TODO proper SQL escaping on ALL the things D:
|
||||||
|
printf -v MYSQL_ROOT_PASSWORD "%q" ${MYSQL_ROOT_PASSWORD}
|
||||||
TEMP_FILE='/tmp/mysql-first-time.sql'
|
TEMP_FILE='/tmp/mysql-first-time.sql'
|
||||||
cat > "$TEMP_FILE" <<-EOSQL
|
cat > "$TEMP_FILE" <<-EOSQL
|
||||||
DELETE FROM mysql.user ;
|
DELETE FROM mysql.user ;
|
||||||
|
Loading…
Reference in New Issue
Block a user