pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid downcasing/truncation of RADIUS authentication parameters.
4+ messages / 1 participants
[nested] [flat]

* pgsql: Avoid downcasing/truncation of RADIUS authentication parameters.
@ 2019-11-13 18:41  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-11-13 18:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid downcasing/truncation of RADIUS authentication parameters.

Commit 6b76f1bb5 changed all the RADIUS auth parameters to be lists
rather than single values.  But its use of SplitIdentifierString
to parse the list format was not very carefully thought through,
because that function thinks it's parsing SQL identifiers, which
means it will (a) downcase the strings and (b) truncate them to
be shorter than NAMEDATALEN.  While downcasing should be harmless
for the server names and ports, it's just wrong for the shared
secrets, and probably for the NAS Identifier strings as well.
The truncation aspect is at least potentially a problem too,
though typical values for these parameters would fit in 63 bytes.

Fortunately, we now have a function SplitGUCList that is exactly
the same except for not doing the two unwanted things, so fixing
this is a trivial matter of calling that function instead.

While here, improve the documentation to show how to double-quote
the parameter values.  I failed to resist the temptation to do
some copy-editing as well.

Report and patch from Marcos David (bug #16106); doc changes by me.
Back-patch to v10 where the aforesaid commit came in, since this is
arguably a regression from our previous behavior with RADIUS auth.

Discussion: https://postgr.es/m/16106-7d319e4295d08e70@postgresql.org

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4be69e2ea14d4f00c77a1185e68b7f9235aeb95f

Modified Files
--------------
doc/src/sgml/client-auth.sgml | 39 +++++++++++++++++++++++++--------------
src/backend/libpq/hba.c       |  8 ++++----
2 files changed, 29 insertions(+), 18 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Avoid downcasing/truncation of RADIUS authentication parameters.
@ 2019-11-13 18:41  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-11-13 18:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid downcasing/truncation of RADIUS authentication parameters.

Commit 6b76f1bb5 changed all the RADIUS auth parameters to be lists
rather than single values.  But its use of SplitIdentifierString
to parse the list format was not very carefully thought through,
because that function thinks it's parsing SQL identifiers, which
means it will (a) downcase the strings and (b) truncate them to
be shorter than NAMEDATALEN.  While downcasing should be harmless
for the server names and ports, it's just wrong for the shared
secrets, and probably for the NAS Identifier strings as well.
The truncation aspect is at least potentially a problem too,
though typical values for these parameters would fit in 63 bytes.

Fortunately, we now have a function SplitGUCList that is exactly
the same except for not doing the two unwanted things, so fixing
this is a trivial matter of calling that function instead.

While here, improve the documentation to show how to double-quote
the parameter values.  I failed to resist the temptation to do
some copy-editing as well.

Report and patch from Marcos David (bug #16106); doc changes by me.
Back-patch to v10 where the aforesaid commit came in, since this is
arguably a regression from our previous behavior with RADIUS auth.

Discussion: https://postgr.es/m/16106-7d319e4295d08e70@postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d9802590a1b32b5d3d071766f7814a31cc00fc87

Modified Files
--------------
doc/src/sgml/client-auth.sgml | 39 +++++++++++++++++++++++++--------------
src/backend/libpq/hba.c       |  8 ++++----
2 files changed, 29 insertions(+), 18 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Avoid downcasing/truncation of RADIUS authentication parameters.
@ 2019-11-13 18:41  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-11-13 18:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid downcasing/truncation of RADIUS authentication parameters.

Commit 6b76f1bb5 changed all the RADIUS auth parameters to be lists
rather than single values.  But its use of SplitIdentifierString
to parse the list format was not very carefully thought through,
because that function thinks it's parsing SQL identifiers, which
means it will (a) downcase the strings and (b) truncate them to
be shorter than NAMEDATALEN.  While downcasing should be harmless
for the server names and ports, it's just wrong for the shared
secrets, and probably for the NAS Identifier strings as well.
The truncation aspect is at least potentially a problem too,
though typical values for these parameters would fit in 63 bytes.

Fortunately, we now have a function SplitGUCList that is exactly
the same except for not doing the two unwanted things, so fixing
this is a trivial matter of calling that function instead.

While here, improve the documentation to show how to double-quote
the parameter values.  I failed to resist the temptation to do
some copy-editing as well.

Report and patch from Marcos David (bug #16106); doc changes by me.
Back-patch to v10 where the aforesaid commit came in, since this is
arguably a regression from our previous behavior with RADIUS auth.

Discussion: https://postgr.es/m/16106-7d319e4295d08e70@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7618eaf5f315f53619b718e571cd2a2020fb0226

Modified Files
--------------
doc/src/sgml/client-auth.sgml | 39 +++++++++++++++++++++++++--------------
src/backend/libpq/hba.c       |  8 ++++----
2 files changed, 29 insertions(+), 18 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Avoid downcasing/truncation of RADIUS authentication parameters.
@ 2019-11-13 18:41  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-11-13 18:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid downcasing/truncation of RADIUS authentication parameters.

Commit 6b76f1bb5 changed all the RADIUS auth parameters to be lists
rather than single values.  But its use of SplitIdentifierString
to parse the list format was not very carefully thought through,
because that function thinks it's parsing SQL identifiers, which
means it will (a) downcase the strings and (b) truncate them to
be shorter than NAMEDATALEN.  While downcasing should be harmless
for the server names and ports, it's just wrong for the shared
secrets, and probably for the NAS Identifier strings as well.
The truncation aspect is at least potentially a problem too,
though typical values for these parameters would fit in 63 bytes.

Fortunately, we now have a function SplitGUCList that is exactly
the same except for not doing the two unwanted things, so fixing
this is a trivial matter of calling that function instead.

While here, improve the documentation to show how to double-quote
the parameter values.  I failed to resist the temptation to do
some copy-editing as well.

Report and patch from Marcos David (bug #16106); doc changes by me.
Back-patch to v10 where the aforesaid commit came in, since this is
arguably a regression from our previous behavior with RADIUS auth.

Discussion: https://postgr.es/m/16106-7d319e4295d08e70@postgresql.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d66e68207e998c9b6180bee5fb55019f35fdacf4

Modified Files
--------------
doc/src/sgml/client-auth.sgml | 39 +++++++++++++++++++++++++--------------
src/backend/libpq/hba.c       |  8 ++++----
2 files changed, 29 insertions(+), 18 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-11-13 18:41 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 18:41 pgsql: Avoid downcasing/truncation of RADIUS authentication parameters. Tom Lane <tgl@sss.pgh.pa.us>
2019-11-13 18:41 pgsql: Avoid downcasing/truncation of RADIUS authentication parameters. Tom Lane <tgl@sss.pgh.pa.us>
2019-11-13 18:41 pgsql: Avoid downcasing/truncation of RADIUS authentication parameters. Tom Lane <tgl@sss.pgh.pa.us>
2019-11-13 18:41 pgsql: Avoid downcasing/truncation of RADIUS authentication parameters. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox