1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-08 07:21:33 +03:00

Fix outdated comment of scram_build_secret()

This routine documented that "iterations" would use a default value if
set to 0 by the caller.  However, the iteration should always be set by
the caller to a value strictly more than 0, as documented by an
assertion.

Oversight in b577743000cd, that has made the iteration count of SCRAM
configurable.

Author: Matheus Alcantara
Discussion: https://postgr.es/m/ac858943-4743-44cd-b4ad-08a0c10cbbc8@gmail.com
Backpatch-through: 16
This commit is contained in:
Michael Paquier 2024-12-10 12:54:14 +09:00
parent a12b0f3a9d
commit 416d1bd66c

View File

@ -200,8 +200,7 @@ scram_ServerKey(const uint8 *salted_password,
* *
* The password should already have been processed with SASLprep, if necessary! * The password should already have been processed with SASLprep, if necessary!
* *
* If iterations is 0, default number of iterations is used. The result is * The result is palloc'd or malloc'd, so caller is responsible for freeing it.
* palloc'd or malloc'd, so caller is responsible for freeing it.
* *
* On error, returns NULL and sets *errstr to point to a message about the * On error, returns NULL and sets *errstr to point to a message about the
* error details. * error details.