Re: Add on_trusted_init and on_untrusted_init to plperl UPDATED [PATCH]
В списке pgsql-hackers по дате отправления:
| От | Robert Haas |
|---|---|
| Тема | Re: Add on_trusted_init and on_untrusted_init to plperl UPDATED [PATCH] |
| Дата | |
| Msg-id | 603c8f071002031153pf0e5901h8361f2491ddc28c6@mail.gmail.com обсуждение |
| Ответ на | Re: Add on_trusted_init and on_untrusted_init to plperl UPDATED [PATCH] (Tim Bunce <Tim.Bunce@pobox.com>) |
| Список | pgsql-hackers |
On Wed, Feb 3, 2010 at 2:38 PM, Tim Bunce <Tim.Bunce@pobox.com> wrote:
>> What I was actually wondering about, however, is the extent to which
>> the semantics of Perl code could be changed from an on_init hook ---
>> is there any equivalent of changing search_path or otherwise creating
>> trojan-horse code that might be executed unexpectedly?
>
> This seems like a reasonable 'vector of first choice':
>
> SET plperl.on_plperl_init = '$SIG{__WARN__} = sub { ... }';
>
> and then do something to trigger a warning from some existing plperl
> function. So I think the answer is yes.
Perl is actually full of places where you can do things like this,
like exporting things into CORE::GLOBAL, or just polluting the package
namespace in which the code will run. Not sure if any of this is
prevented by Safe.
...Robert
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера