Re: ISO guidelines/strategies to guard injection attacks

Поиск
Список
Период
Сортировка
От Andy Colson
Тема Re: ISO guidelines/strategies to guard injection attacks
Дата
Msg-id 4B5626AA.1020904@squeakycode.net
обсуждение исходный текст
Ответ на ISO guidelines/strategies to guard injection attacks  (Kynn Jones <kynnjo@gmail.com>)
Ответы Re: ISO guidelines/strategies to guard injection attacks  (Andy Colson <andy@squeakycode.net>)
Список pgsql-general
On 1/19/2010 3:23 PM, Kynn Jones wrote:
> I have a Perl CGI script (using DBD::Pg) that interfaces with a
> server-side Pg database.  I'm looking for general
> guidelines/tools/strategies that will help me guard against SQL
> injection attacks.
>
> Any pointers/suggestions would be much appreciated.
>
> ~K
>

prepare your queries:

my $q = $db->prepare('select something from table where key = $1');
$q->execute(42);

and..
$db->do('update table set field = $1 where key = $2', undef, 'key', 42);

(*guessed at the do().  I think there is an undef in there, or something*)

-Andy

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

Предыдущее
От: Ben Chobot
Дата:
Сообщение: changing log_min_duration_statement
Следующее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: changing log_min_duration_statement