aboutsummaryrefslogtreecommitdiff
path: root/src/common/scram-common.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-12-10 12:54:09 +0900
committerMichael Paquier <michael@paquier.xyz>2024-12-10 12:54:09 +0900
commit7b2690a5713e66c64313cea1cf881da3dcaaae2a (patch)
treead95e7e67f431e9b3c8cbf17acc003503d839ae0 /src/common/scram-common.c
parent724890ffb75c703afc1e0287f5a66b94c2998799 (diff)
downloadpostgresql-7b2690a5713e66c64313cea1cf881da3dcaaae2a.tar.gz
postgresql-7b2690a5713e66c64313cea1cf881da3dcaaae2a.zip
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
Diffstat (limited to 'src/common/scram-common.c')
-rw-r--r--src/common/scram-common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/scram-common.c b/src/common/scram-common.c
index b611bb8fe71..51cc12e8c3e 100644
--- a/src/common/scram-common.c
+++ b/src/common/scram-common.c
@@ -200,8 +200,7 @@ scram_ServerKey(const uint8 *salted_password,
*
* The password should already have been processed with SASLprep, if necessary!
*
- * If iterations is 0, default number of iterations is used. The result is
- * palloc'd or malloc'd, so caller is responsible for freeing it.
+ * The result is 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
* error details.