<div dir="ltr">If the inputs are edited prior to the construction of the string and these fields are used for more than one update then it's not an exploit.  It's simply a matter not repeating yourself when coding.<div>
<br></div><div>In this particular case too, we're talking about a list of integers that gets inserted into a string.  If the list is validated prior to its insertion into an SQL statement then there is no exploit.  If I write a batch program (not a web program) that retrieves this list of integers from other sources and validates the data prior to using it in an SQL statement, that should be sufficient.  </div>
<div><br></div><div>As far as wrong and right is concerned. I think it's more about doing what is appropriate according to the circumstances.  As a rule you should only code what is appropriate for the circumstances.  If it's appropriate to code more simply without introducing unnecessary complexity you should do so.</div>
<div><br></div><div>I work in the data warehousing ETL world, where we have to perform field edits or transformations to load source data into databases.  If I'm already performing edits on these fields and if these fields are going to be used for more updates downstream, it's wasteful to perform them again when I build the SQL insert with the list and execute it. </div>
<div><br></div><div>Finally, whatever happened to the practice of granting appropriate privileges to IDs that perform database operations?  Shouldn't the person acting in the capacity of DBA ensure that the user updating or retrieving data from the database does not have DROP, ALTER, or CREATE privileges on that database? <br>
<br><div class="gmail_quote">On Sat, Sep 27, 2008 at 9:14 AM, Tino Wildenhain <span dir="ltr"><<a href="mailto:tino@wildenhain.de">tino@wildenhain.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<div class="Ih2E3d"><br>
<br>
Michael Mabin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
so you wouldn't object then to something like<br>
         '.... in (%)' % ','.join([str_edit_for_exploit(x) for x in aList]) <br>
if str_edit_for_exploit applied security edits?<br>
</blockquote>
<br></div>
Whats an security edit btw? If it is something meant to turn possibly<br>
insecure data into 'secure' then, no I would still object.<br>
Why? Because its a bad example of "default permit". Its always better<br>
to have a whitelist - even more so when its so easy to do.<br>
<br>
Its just a habit you develope - if you never do it right, how would you<br>
know when and how to do it right when you need to?<br><font color="#888888">
<br>
Tino<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>| _ | * | _ |<br>| _ | _ | * |<br>| *  | * | * |<br>
</div></div>