pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Davi Leal <davileal@terra.es>
To: pgsql-php@postgresql.org
Cc: web-dev@gnuherds.org
Subject: postgreSQL web form; Security
Date: Mon, 14 Jul 2003 21:10:14 +0200
Message-ID: <200307142110.14069.davileal@terra.es> (raw)
In-Reply-To: <20030713200102.GA15127@wilbur.25thandClement.com>
References: <200307132144.02772.davileal@terra.es>
	<20030713200102.GA15127@wilbur.25thandClement.com>

Hi,

We are developing a web page: PHP & postgreSQL. We can transform the below (a) 
query to get the (b) query, if we add,
 "01001'); DELETE * FROM tbHosp; INSERT INTO tbRev (Id) VALUES ('01001"
, as the value of Id in the web form.

(a) INSERT INTO tbRev (Id) VALUES ('01001');

(b) INSERT INTO tbRev (Id) VALUES ('01001'); DELETE FROM tbHosp; INSERT INTO 
tbRev (Id) VALUES ('01001');


We are able to delete registers. We have checked and it works!. Microsoft 
Access 2000 does not allow me execute a composed query. It warns with 
something similar to "ERROR; -2147217900 [Microsoft][Microsoft Access ODBC 
Driver] Characters after the end of the first SQL query".


How can we avoid this security risk using PHP & postgreSQL?.

Regards,
Davi




view thread (4+ messages)  latest in thread

Message-ID: <200307142110.14069.davileal@terra.es>
Permalink:  ../200307142110.14069.davileal@terra.es/
Also on:    postgresql.org/message-id/200307142110.14069.davileal@terra.es

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: davileal@terra.es, web-dev@gnuherds.org
  Subject: Re: postgreSQL web form; Security
  In-Reply-To: <200307142110.14069.davileal@terra.es>
  References: <200307132144.02772.davileal@terra.es> <20030713200102.GA15127@wilbur.25thandClement.com> <200307142110.14069.davileal@terra.es>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox