Re: BUG #19714: pgcrypto pgp_sym_encrypt accepts nonnumeric s2k-mode as mode 0

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Sho Ito <i(dot)sho(dot)0628(at)gmail(dot)com>, imchifan(at)163(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19714: pgcrypto pgp_sym_encrypt accepts nonnumeric s2k-mode as mode 0
Date: 2026-11-11 01:03:20
Message-ID: CAGRkXqTcB7nWNYPxRQ2o7RAVEWAufmWqjm0rj8zXShrJ5rsy5g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Daniel,

Thanks for v2. expect-s2k-mode now goes through PARSE_INT_AS_BOOL, so
the existing expect-s2k-mode=3 tests in pgp-encrypt fail.

It should use the same range as s2k-mode:

ex->s2k_mode = parse_int_arg(val, PGP_S2K_SIMPLE, PGP_S2K_ISALTED);

> Still thinking about this, but off the cuff I'd prefer to backpatch.
Backpatching is fine with me. I think that should go back to 14

Thanks,
Shihao

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message shihao zhong 2026-11-11 01:17:27 Re: BUG #19849: queries fail after ANALYZE with expression stats on arrays
Previous Message Michael Paquier 2026-11-11 00:33:16 Re: BUG #19780: gtsvector_picksplit() reads uninitialized data when called with three entries