pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: fuboat@outlook.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18496: Strange Handling for Circular Views and Permissions in PostgreSQL
Date: Thu, 06 Jun 2024 12:16:28 -0400
Message-ID: <1025641.1717690588@sss.pgh.pa.us> (raw)
In-Reply-To: <18496-62ecca730bfdfceb@postgresql.org>
References: <18496-62ecca730bfdfceb@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> When a user without SELECT permissions tries to perform a select operation
> on a circular view, PostgreSQL will report an error saying "infinite
> recursion detected in rules for relation v2" instead of "permission denied
> for view v2". Is this a bug or an unexpected behavior?

[ shrug... ]  Neither, I'd say.  There are no specific restrictions on
the order in which error checks are performed.

> Regardless, a circular view is an invalid view and should not appear in
> normal scenarios, so reporting this error message does not have any negative
> impact. However, should this error take precedence over the SELECT
> permission error, and could some important error messages potentially be
> leaked in this way to users without permissions?

It's hard to see how this leaks any information that's not
readily available to everybody from the system catalogs
(ie, "\d+ v1" and "\d+ v2").

			regards, tom lane





view thread (2+ messages)

Message-ID: <1025641.1717690588@sss.pgh.pa.us>
Permalink:  ../1025641.1717690588@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1025641.1717690588@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, fuboat@outlook.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18496: Strange Handling for Circular Views and Permissions in PostgreSQL
  In-Reply-To: <1025641.1717690588@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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