Re: getting confused parsing ACLITEMS...

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: getting confused parsing ACLITEMS...
Дата
Msg-id 200308142156.h7ELu6Q12930@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: getting confused parsing ACLITEMS...  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список pgsql-hackers
I believe Tom just applied this.  Thanks.

---------------------------------------------------------------------------

Christopher Kings-Lynne wrote:
> The situation seems to be a bug that this patch would address.  It seems to
> me that when a username is considered unsafe due to containing double
> quotes, the double quotes should be escaped (and the backslashes)!
> 
> Does this look alright?
> 
> Chris
> 
> Index: src/backend/utils/adt/acl.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/adt/acl.c,v
> retrieving revision 1.94
> diff -c -r1.94 acl.c
> *** src/backend/utils/adt/acl.c 4 Aug 2003 02:40:04 -0000       1.94
> --- src/backend/utils/adt/acl.c 8 Aug 2003 09:03:19 -0000
> ***************
> *** 124,131 ****
>         }
>         if (!safe)
>                 *p++ = '"';
> !       for (src = s; *src; src++)
>                 *p++ = *src;
>         if (!safe)
>                 *p++ = '"';
>         *p = '\0';
> --- 124,134 ----
>         }
>         if (!safe)
>                 *p++ = '"';
> !       for (src = s; *src; src++) {
> !               if (!safe && (*src == '"' || *src == '\\'))
> !                       *p++ = '\\';
>                 *p++ = *src;
> +       }
>         if (!safe)
>                 *p++ = '"';
>         *p = '\0';
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] UPDATED UnixWare Threads Patch.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] 7.4Beta