Repository navigation
Put pg_temp last in SECURITY DEFINER search_path - #12
Open
jnasbyupgrade wants to merge 2 commits into
Open
jnasbyupgrade wants to merge 2 commits into
jnasbyupgrade wants to merge 2 commits into
Conversation
SET search_path = pg_catalog leaves pg_temp searched first for relations and types. List it last explicitly, in fresh installs and in the 0.3.3--stable update, and assert it for every SECURITY DEFINER function in the extension.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
An ends-with-pg_temp check passes for 'public, pg_catalog, pg_temp'. Compare against the exact value, and comment the ALTER block in the 0.3.3--stable update script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claude here.
Stacked on #11; base is
fix-script-guc-leak.The seven
SECURITY DEFINERfunctions now useSET search_path = pg_catalog, pg_temp. With plainpg_catalog,pg_tempis searched first for relations and types, andprocess_language()andextract_parameters()EXECUTE SQL containing unqualified type names.sql/trunklet.sql: all seven clauses changed.sql/trunklet--0.3.3--stable.sql:ALTER FUNCTION ... SET search_pathfor each, so updated installs match fresh ones.test_secdef_privs: asserts the exact valuepg_catalog, pg_tempfor everySECURITY DEFINERfunction in the extension (the test comparesproconfigtoARRAY['search_path=pg_catalog, pg_temp']). It runs on both the fresh and update install paths.HISTORY.asc: entry added.Released scripts are unchanged.
make testandmake test-updatepass on PG12 and PG17.