Re: Is it possible to do some damage to database with SELECT query?

Поиск
Список
Период
Сортировка
Искать
От
Karsten Hilbert
Тема
Re: Is it possible to do some damage to database with SELECT query?
Дата
Msg-id
20080722132840.GB3859@merkur.hilbert.loc
Ответ на
Список
Дерево обсуждения
How to remove duplicate lines but save one of the lines? "A B" <gentosaker@gmail.com>
Re: How to remove duplicate lines but save one of the lines? Raymond O'Donnell <rod@iol.ie>
Re: How to remove duplicate lines but save one of the lines? Said Ramirez <sramirez@vonage.com>
Re: How to remove duplicate lines but save one of the lines? "A B" <gentosaker@gmail.com>
Re: How to remove duplicate lines but save one of the lines? Said Ramirez <sramirez@vonage.com>
Re: How to remove duplicate lines but save one of the lines? "Scott Marlowe" <scott.marlowe@gmail.com>
Re: How to remove duplicate lines but save one of the lines? "Hoover, Jeffrey" <jhoover@jcvi.org>
Re: How to remove duplicate lines but save one of the lines? btober@ct.metrocast.net
Re: How to remove duplicate lines but save one of the lines? Julio Cesar Sánchez González<knowhow@sistemasyconectividad.com.mx>
Re: How to remove duplicate lines but save one of the lines? Kedar <kedarr@netcore.co.in>
Re: How to remove duplicate lines but save one of the lines? "Francisco Reyes" <lists@stringsutils.com>
On Tue, Jul 22, 2008 at 12:20:46PM +0200, A. Kretschmer wrote:

> > is it possible to make a SELECT query with some nasty follow up commands, 
> > which damages the database.
> > 
> > Something like:
> > 
> > SELECT *,(DROP DATABASE enterprise) AS roger FROM sales WHERE sales > 
> > (UPDATE order SET order=1);
> > 
> > I know this wont work, but is there some possibility to modify database 
> > with SELECT query?
> 
> Sure, with sql-injection. There are a lot to read via google, for
> instance http://en.wikipedia.org/wiki/SQL_injection

That's why on important databases you'd configure them

	"set default_transaction_read_only to on"

and only reverse that connect by connect when a writable
connection is truly needed. That way injectors will not only
have to hijack *any* connection but pick the right one, too.

It also nicely keeps average users from destroying their
data with admin tools like pgadmin etc.

And then there's role based per-table permissions, of course.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
В списке pgsql-general по дате отправления
От: Brandon Metcalf
Дата:
Сообщение: Re: ER diagram software
От: Rich Shepard
Дата:
FAQ