From: | Marc Evans <Marc(at)SoftwareHackery(dot)Com> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bricklen Anderson <banderson(at)presinet(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: plperl exception catching |
Date: | 2006-12-14 11:15:34 |
Message-ID: | 20061214061404.L70268@me.softwarehackery.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 13 Dec 2006, Martijn van Oosterhout wrote:
> On Wed, Dec 13, 2006 at 05:04:42PM -0500, Tom Lane wrote:
>> Bricklen Anderson <banderson(at)presinet(dot)com> writes:
>>> Marc Evans wrote:
>>>> OK, I must be missing something obvious:
>>>> ERROR: creation of Perl function failed: 'eval "string"' trapped by
>>>> operation mask at line 2.
>>
>>> Try as plperlu
>>
>> This brings up the question of whether it'd be safe to allow eval in
>> plperl functions. I'm not sure why it's excluded now ... does it allow
>> access to untrusted operations?
>
> ISTM there being something about the Safe module in perl not being able
> to enable eval while staying "safe", so to speak.
>
> Looking at the safe module it looks like you can exclude certain
> functions from restrictions. The manpage has an example, so a simple
> try/catch mechanism could be created if enabling "eval" directly isn't
> ok.
I believe that the BLOCK variation of eval could be considered safe, e.g.
eval { ... } but the EXPR version of eval probably should not be
considered safe, e.g. eval "...".
- Marc
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2006-12-14 11:51:41 | Re: about the RULE system |
Previous Message | Luca Ferrari | 2006-12-14 11:12:32 | unix/linux administration tools |