Re: Re: [PATCHES] Fw: Isn't pg_statistic a security hole - Solution Proposal

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Joe Conway <joe(at)conway-family(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [PATCHES] Fw: Isn't pg_statistic a security hole - Solution Proposal
Date: 2001-06-11 04:57:21
Message-ID: 200106110457.f5B4vL003982@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> I have just thought of a possible compromise. Peter is right that we
> don't want case conversion on table names that are extracted from
> catalogs. But I think we do want it on table names expressed as string
> literals. Could we make the assumption that table names in catalogs
> will be of type 'name'? If so, it'd work to make two versions of the
> has_table_privilege function, one taking type "name" and the other
> taking type "text". The "name" version would take its input as-is,
> the "text" version would do case folding and truncation. This would
> work transparently for queries selecting relation names from the system
> catalogs, and it'd also work transparently for queries using unmarked
> string literals (which will be preferentially resolved as type "text").
> Worst case if the system makes the wrong choice is you throw in an
> explicit coercion to name or text. Comments?

Seems you are adding a distinction between name and text that we never
had before. Is it worth it to fix this case?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martín Marqués 2001-06-11 05:25:59 Re: something smells bad
Previous Message Bruce Momjian 2001-06-11 04:28:28 Re: something smells bad

Browse pgsql-patches by date

  From Date Subject
Next Message Marko Kreen 2001-06-11 09:14:18 sequence.c compile failure
Previous Message Bruce Momjian 2001-06-11 04:31:08 Re: YA readline 4.2 patch