Thread

Commits

  1. Tighten pg_get_object_address argument checking

  1. Tighten pg_get_object_address argument checking

    Peter Eisentraut <peter.eisentraut@enterprisedb.com> — 2022-09-20T17:44:12Z

    For publication schemas (OBJECT_PUBLICATION_NAMESPACE) and user
    mappings (OBJECT_USER_MAPPING), pg_get_object_address() checked the
    array length of the second argument, but not of the first argument.
    If the first argument was too long, it would just silently ignore
    everything but the first argument.  Fix that by checking the length of
    the first argument as well.
    
    I wouldn't be surprised if there were more holes like this in this area. 
      I just happened to find these while working on something related.
  2. Re: Tighten pg_get_object_address argument checking

    Amit Kapila <amit.kapila16@gmail.com> — 2022-09-21T10:01:59Z

    On Tue, Sep 20, 2022 at 11:14 PM Peter Eisentraut
    <peter.eisentraut@enterprisedb.com> wrote:
    >
    > For publication schemas (OBJECT_PUBLICATION_NAMESPACE) and user
    > mappings (OBJECT_USER_MAPPING), pg_get_object_address() checked the
    > array length of the second argument, but not of the first argument.
    > If the first argument was too long, it would just silently ignore
    > everything but the first argument.  Fix that by checking the length of
    > the first argument as well.
    >
    
    LGTM.
    
    -- 
    With Regards,
    Amit Kapila.
    
    
    
    
  3. Re: Tighten pg_get_object_address argument checking

    Peter Eisentraut <peter.eisentraut@enterprisedb.com> — 2022-09-21T14:00:20Z

    On 21.09.22 12:01, Amit Kapila wrote:
    > On Tue, Sep 20, 2022 at 11:14 PM Peter Eisentraut
    > <peter.eisentraut@enterprisedb.com> wrote:
    >>
    >> For publication schemas (OBJECT_PUBLICATION_NAMESPACE) and user
    >> mappings (OBJECT_USER_MAPPING), pg_get_object_address() checked the
    >> array length of the second argument, but not of the first argument.
    >> If the first argument was too long, it would just silently ignore
    >> everything but the first argument.  Fix that by checking the length of
    >> the first argument as well.
    > 
    > LGTM.
    
    Committed, thanks for checking.