Re: Application name patch - v2

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Application name patch - v2
Date: 2009-10-19 08:29:51
Message-ID: 162867790910190129o4b5d9e2am70456275ebb8b73e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/10/19 Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>:
> Pavel Stehule wrote:
>> 2009/10/19 Dave Page <dpage(at)pgadmin(dot)org>:
>>> On Mon, Oct 19, 2009 at 8:37 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>>>> So this would effectively allow any minimally authorized user to write
>>>> whatever they want into the log file whenever they want?  Doesn't sound
>>>> very safe to me.
>>> A user can do that anyway if query logging is turned on, but anyway,
>>> what would you suggest - accept a-zA-Z0-9 and a few other choice
>>> characters only, or just reject a handful (and if so, what)?
>>
>> I dislike write access to app name guc for user too. It's not safe.
>> Maybe only super user can do it?
>
> The application name is provided by the client. In the server, we have
> no control over what the client put there. We can limit it to certain
> characters, but other than that we just have to take it at face value.
>
> Or are you saying that it should not be possible for the client to
> change the value after connecting? That limits the usefulness with
> connection pools.
>

What I know, connections from connection pool without reset are shared
by one application. But I am not against some possibility to change
this value from application. I am against to possibility an change by
normal user. When we allow it, then this value has not any wight,
because any broken appliaction (via SQL injection) can change it.

Regards
Pavel Stehule

> --
>  Heikki Linnakangas
>  EnterpriseDB   http://www.enterprisedb.com
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2009-10-19 08:30:56 Re: Application name patch - v2
Previous Message Pavel Stehule 2009-10-19 08:23:55 Re: Application name patch - v2