model-writtenrun 9492 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jonathan S. Katz reported that malformed SCRAM-looking passwords could be stored unchanged and prevent login, both through CREATE/ALTER ROLE and after upgrading older plaintext-password installations #1.
- Jonathan proposed using the existing SCRAM parser to distinguish valid verifiers from plaintext #2; Michael Paquier endorsed processing invalid verifiers according to password_encryption and requested regression coverage, which Jonathan added #3 #8.
- Tom Lane identified the analogous MD5 weakness and proposed checking hexadecimal characters #5; Stephen Frost argued that password encoding should have separate catalog representation, while raf defended prefixed formats when unambiguous #6 #9.
- When Jonathan's initial MD5 expression included the prefix in its character check, Tom showed how to skip the first three bytes; Jonathan incorporated that correction into an incremental MD5 patch and reported successful login tests #10 #11 #12.
- Tom suggested TAP authentication tests but doubted that their additional complexity was worthwhile #13; Michael instead combined the SCRAM and MD5 fixes, reused the existing regression query, and added an invalid-MD5 test #15.
- Michael's combined patch removed the MD5 length check, but Tom and Jonathan demonstrated that this would accept trailing nonhexadecimal junk #16 #17; Jonathan accepted the test simplification, and Tom and Michael favored committing both validation fixes together #18 #19 #20.
- Michael committed Jonathan's combined work as ccae190b91, based on #15 with the length check restored, the redundant SCRAM prefix check removed, and another regression case added; he announced backpatching through PostgreSQL 10 in #21.
- Michael then posted an MD5-only adaptation for the older isMD5 macro and raised whether release notes should include a diagnostic query #21; Jonathan confirmed the older affected branches and proposed guidance to reset affected passwords #22.
- The catalog-design discussion remained separate from the fix: Stephen reiterated the ambiguity of accepting arbitrary plaintext and favored an independent catalog, while Tom considered accidental collisions with validated hash formats exceedingly unlikely #23 #24 #25.
- Michael committed the legacy patch from #21 unchanged as af298f00a1 for PostgreSQL 9.4–9.6 and confirmed completion in #27; all posted fixes had landed, while the placement of diagnostic guidance remained undecided in #26.