On Sun, Mar 18, 2007 at 09:39:30AM +0100, Gregor Horvath wrote:
> This seems to work:
>
> >>> Tour.select("tour.id = 2; delete from tour").count()
>
> After that, table tour is empty.
> Is there any patch or fix for that available?
There is no, and I am sure it'd be hard to make one. To fix this
SQLObject needs a full-blown SQL parser with all backends variants (MySQL,
PostgreSQL, SQLite specific).
> I think a select should only execute select sql's.
Wanna work on this?
It'd be simpler to fix application - i.e. pass to .select() only
carefully constructed conditions, even better SQLExpressions:
Tour.select(Tour.q.id == 2).count()
Never blindly accept input from web forms and pass it to SQL. SQL
injection is a real problem but it's easy to overcome - just test that user
has entered an integer ID, not a string.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss