in reply to Re: Magical SQL
in thread Magical SQL
2) Checking for invalid and insecure values is out of scope of this idea and must be done as usual before calling Update().
I don't want waste code with building another hash with many not important fields. This is ugly. See this example:
I think my way is right and secure becouse:# ... here user-supplied values was checked # variant 1, selecting all fields %newQ = ( id_cust=>$CustID, login => $Q{login}, pass => $Q{pass}, emai +l => $Q{email}, addr1 => $Q{addr1}, addr2 => $Q{addr2}, phone => $Q{p +hone}, ........... ); # variant 2, force only required fields %newQ = (%Q, id_cust=>$CustID);
Update:
3) About DBIx::Abstract - my inferface is more suitable for lazy programmers becouse it is designed to parse all required information from single hash in form, which can be supplied by user running CGI. And for best security this hash NEVER contain part of SQL queries like "DATE_ADD(NOW(), INTERVAL ? HOUR)". Such type of queries can be done with help of special field names like FIELDNAME__date_add.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Allow override
by Anonymous Monk on Apr 26, 2002 at 11:38 UTC |