git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 1f30295) | patch
Remove support for password_encryption='off' / 'plain'.
Mon, 8 May 2017 08:26:07 +0000 (11:26 +0300)
Mon, 8 May 2017 08:26:07 +0000 (11:26 +0300)
commit eb61136dc75a76caef8460fa939244d8593100f2
Remove support for password_encryption='off' / 'plain'.

Storing passwords in plaintext hasn't been a good idea for a very long
time, if ever. Now seems like a good time to finally forbid it, since we're
messing with this in PostgreSQL 10 anyway.

Remove the CREATE/ALTER USER UNENCRYPTED PASSSWORD 'foo' syntax, since
storing passwords unencrypted is no longer supported. ENCRYPTED PASSWORD
'foo' is still accepted, but ENCRYPTED is now just a noise-word, it does
the same as just PASSWORD 'foo'.

Likewise, remove the --unencrypted option from createuser, but accept
--encrypted as a no-op for backward compatibility. AFAICS, --encrypted was
a no-op even before this patch, because createuser encrypted the password
before sending it to the server even if --encrypted was not specified. It
added the ENCRYPTED keyword to the SQL command, but since the password was
already in encrypted form, it didn't make any difference. The documentation
was not clear on whether that was intended or not, but it's moot now.

Also, while password_encryption='on' is still accepted as an alias for
'md5', it is now marked as hidden, so that it is not listed as an accepted
value in error hints, for example. That's not directly related to removing
'plain', but it seems better this way.

Reviewed by Michael Paquier

Discussion: https://www.postgresql.org/message-id/16e9b768-fd78-0b12-cfc1-7b6b7f238fde@iki.fi
21 files changed:
contrib/passwordcheck/passwordcheck.c diff | blob | blame | history
doc/src/sgml/config.sgml diff | blob | blame | history
doc/src/sgml/ref/alter_role.sgml diff | blob | blame | history
doc/src/sgml/ref/alter_user.sgml diff | blob | blame | history
doc/src/sgml/ref/create_group.sgml diff | blob | blame | history
doc/src/sgml/ref/create_role.sgml diff | blob | blame | history
doc/src/sgml/ref/create_user.sgml diff | blob | blame | history
doc/src/sgml/ref/createuser.sgml diff | blob | blame | history
src/backend/commands/user.c diff | blob | blame | history
src/backend/libpq/auth-scram.c diff | blob | blame | history
src/backend/libpq/auth.c diff | blob | blame | history
src/backend/libpq/crypt.c diff | blob | blame | history
src/backend/parser/gram.y diff | blob | blame | history
src/backend/utils/misc/guc.c diff | blob | blame | history
src/bin/psql/tab-complete.c diff | blob | blame | history
src/bin/scripts/createuser.c diff | blob | blame | history
src/include/libpq/crypt.h diff | blob | blame | history
src/interfaces/libpq/fe-auth.c diff | blob | blame | history
src/test/authentication/t/001_password.pl diff | blob | blame | history
src/test/regress/expected/password.out diff | blob | blame | history
src/test/regress/sql/password.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /