From: Pierre-Frédéric Caillaud <lists@boutiquenumerique.com>
To: pgsql-performance@postgresql.org
Subject: Re: Data type to use for primary key
Date: Tue, 23 Nov 2004 17:45:27 +0100
Message-ID: <opshxfh1ibcq72hf@musicbox> (raw)
In-Reply-To: <PDEOIIFFBIAABMGNJAGPMEHADLAA.pdarley@kinesis-cem.com>
References: <PDEOIIFFBIAABMGNJAGPMEHADLAA.pdarley@kinesis-cem.com>
> All,
> Well, you should still escape any strings you're getting from a web
> page so
> you can ensure you're not subject to a SQL insert attack, even if you're
> expecting integers.
> Thanks,
> Peter Darley
Well, your framework should do this for you :
"integer" specified in your database object class description
"%d" appears in in your generated queries (or you put it in your hand
written queries)
=> if the parameter is not an integer, an exception is thrown, then
catched, then an error page is displayed...
Or, just casting to int should throw an exception...
Forms should be validated, but hidden parameters in links are OK imho to
display an error page if they are incorrect, after all, if the user edits
the get or post parameters, well...
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lists@boutiquenumerique.com
Subject: Re: Data type to use for primary key
In-Reply-To: <opshxfh1ibcq72hf@musicbox>
* 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