Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5018~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5018
Choose a head ref
  • 2 commits
  • 17 files changed
  • 2 contributors

Commits on Apr 22, 2025

  1. Add support for extensions with an owned schema

    Writing the sql migration scripts that are run by CREATE EXTENSION and
    ALTER EXTENSION UPDATE are security minefields for extension authors.
    One big reason for this is that search_path is set to the schema of the
    extension while running these scripts, and thus if a user with lower
    privileges can create functions or operators in that schema they can do
    all kinds of search_path confusion attacks if not every function and
    operator that is used in the script is schema qualified. While doing
    such schema qualification is possible, it relies on the author to never
    make a mistake in any of the sql files. And sadly humans have a tendency
    to make mistakes.
    
    This patch adds a new "owned_schema" option to the extension control
    file that can be set to true to indicate that this extension wants to
    own the schema in which it is installed. What that means is that the
    schema should not exist before creating the extension, and will be
    created during extension creation. This thus gives the extension author
    an easy way to use a safe search_path, while still allowing all objects
    to be grouped together in a schema. The implementation also has the
    pleasant side effect that the schema will be automatically dropped when
    the extension is dropped.
    JelteF authored and Commitfest Bot committed Apr 22, 2025
    Configuration menu
    Copy the full SHA
    0d5e3e3 View commit details
    Browse the repository at this point in the history
  2. [CF 5018] v4 - Extension security improvement: Add support for extens…

    …ions with an owned schema
    
    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5018
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/CAGECzQS02M6YPDXemo36tShO-ZYObjqnyTJyVttua1PGyN4xRw@mail.gmail.com
    Author(s): Jelte Fennema-Nio
    Commitfest Bot committed Apr 22, 2025
    Configuration menu
    Copy the full SHA
    a819012 View commit details
    Browse the repository at this point in the history
Loading