git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 1ca583f) | patch
oauth: Limit JSON parsing depth in the client
2025年5月23日 20:05:33 +0000 (13:05 -0700)
2025年5月23日 20:05:33 +0000 (13:05 -0700)
commit cbc8fd0c9aec01f451af5e4eeb0eb2c5d5e47eb2
oauth: Limit JSON parsing depth in the client

Check the ctx->nested level as we go, to prevent a server from running
the client out of stack space.

The limit we choose when communicating with authorization servers can't
be overly strict, since those servers will continue to add extensions in
their JSON documents which we need to correctly ignore. For the SASL
communication, we can be more conservative, since there are no defined
extensions (and the peer is probably more Postgres code).

Reviewed-by: Aleksander Alekseev <aleksander@timescale.com>
Discussion: https://postgr.es/m/CAOYmi%2Bm71aRUEi0oQE9ciBnBS8xVtMn3CifaPu2kmJzUfhOZgA%40mail.gmail.com
src/interfaces/libpq-oauth/oauth-curl.c diff | blob | blame | history
src/interfaces/libpq/fe-auth-oauth.c diff | blob | blame | history
src/test/modules/oauth_validator/t/001_server.pl diff | blob | blame | history
src/test/modules/oauth_validator/t/oauth_server.py diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /