mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
ca59dfa6f7
A password containing a character with the high bit set was misprocessed on machines where char is signed (which is most). This could cause the preceding one to three characters to fail to affect the hashed result, thus weakening the password. The result was also unportable, and failed to match some other blowfish implementations such as OpenBSD's. Since the fix changes the output for such passwords, upstream chose to provide a compatibility hack: password salts beginning with $2x$ (instead of the usual $2a$ for blowfish) are intentionally processed "wrong" to give the same hash as before. Stored password hashes can thus be modified if necessary to still match, though it'd be better to change any affected passwords. In passing, sync a couple other upstream changes that marginally improve performance and/or tighten error checking. Back-patch to all supported branches. Since this issue is already public, no reason not to commit the fix ASAP. |
||
---|---|---|
.. | ||
expected | ||
sql | ||
.gitignore | ||
blf.c | ||
blf.h | ||
crypt-blowfish.c | ||
crypt-des.c | ||
crypt-gensalt.c | ||
crypt-md5.c | ||
fortuna.c | ||
fortuna.h | ||
imath.c | ||
imath.h | ||
internal-sha2.c | ||
internal.c | ||
Makefile | ||
mbuf.c | ||
mbuf.h | ||
md5.c | ||
md5.h | ||
openssl.c | ||
pgcrypto--1.0.sql | ||
pgcrypto--unpackaged--1.0.sql | ||
pgcrypto.c | ||
pgcrypto.control | ||
pgcrypto.h | ||
pgp-armor.c | ||
pgp-cfb.c | ||
pgp-compress.c | ||
pgp-decrypt.c | ||
pgp-encrypt.c | ||
pgp-info.c | ||
pgp-mpi-internal.c | ||
pgp-mpi-openssl.c | ||
pgp-mpi.c | ||
pgp-pgsql.c | ||
pgp-pubdec.c | ||
pgp-pubenc.c | ||
pgp-pubkey.c | ||
pgp-s2k.c | ||
pgp.c | ||
pgp.h | ||
px-crypt.c | ||
px-crypt.h | ||
px-hmac.c | ||
px.c | ||
px.h | ||
random.c | ||
rijndael.c | ||
rijndael.h | ||
rijndael.tbl | ||
sha1.c | ||
sha1.h | ||
sha2.c | ||
sha2.h |