1
0
mirror of https://github.com/docker-library/postgres.git synced 2025-11-17 13:02:40 +03:00

Merge pull request #511 from infosiftr/pass-100

Warn on POSTGRES_PASSWORD of 100+ characters
This commit is contained in:
yosifkit
2019-01-09 14:57:37 -08:00
committed by GitHub
11 changed files with 143 additions and 0 deletions

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'

View File

@@ -84,6 +84,19 @@ if [ "$1" = 'postgres' ]; then
# messes it up # messes it up
if [ -n "$POSTGRES_PASSWORD" ]; then if [ -n "$POSTGRES_PASSWORD" ]; then
authMethod=md5 authMethod=md5
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
else else
# The - option suppresses leading tabs but *not* spaces. :) # The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOWARN' cat >&2 <<-'EOWARN'