<div dir="ltr">QGIS Server does it's own escaping and filters allowed characters and words in filters.<div><br></div><div>giovanni</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-06 18:59 GMT+01:00 Alessandro Pasotti <span dir="ltr"><<a href="mailto:apasotti@gmail.com" target="_blank">apasotti@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-03-06 18:51 GMT+01:00 Gino Pirelli <span dir="ltr"><<a href="mailto:luipir@gmail.com" target="_blank">luipir@gmail.com</a>></span>:<div class="">
<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Thank you Jürgen, I feel safer ;) but... I can't figure out how postgres quote_* methods manage "--" Comments or String without Quotes that can break SQL statement or introduce elements that can't be escaped...</div>
<div><br></div><div>I would appreciate opinions by DB experts because looking around all says that escaping it's not enough.</div><div><div><br></div><div><pre style="white-space:pre-wrap;font-size:10.285714149475098px;margin-top:0px;margin-bottom:0px">
<font color="#000000" face="arial">Luigi Pirelli (<a href="mailto:luigi.pirelli@faunalia.it" target="_blank">luigi.pirelli@faunalia.it</a> - <a href="mailto:luipir@gmail.com" target="_blank">luipir@gmail.com</a>)</font></pre>
</div></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 March 2014 16:35, Jürgen E. <span dir="ltr"><<a href="mailto:jef@norbit.de" target="_blank">jef@norbit.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Gino,<br>
<div><br>
On Thu, 06. Mar 2014 at 12:10:02 +0100, Gino Pirelli wrote:<br>
> but they quote only ' or \ so they are -not- enough to a complete sql<br>
> injection protection [4]<br>
<br>
</div>Um, the link doesn't clearly point out what else to do.<br>
<div><br>
> every DB have it's internal functions to manage this cases, but better<br>
> use parametrized queries as in many parts of the provider... but not<br>
> in all parts.<br>
<br>
</div>[1] looks similar. It duplicates all backslashes not just those in front of a<br>
double quote and prepends a E to strings with backslashes. 7829e7a now does it<br>
the same way.<br>
<br></blockquote></div></div></div></div></blockquote><div><br></div><div><br></div></div><div>Hi Gino,</div><div><br></div><div>are you worried about functions exposed by QGIS Mapserver or by the desktop? </div></div><span class="HOEnZb"><font color="#888888"><div>
<br>
</div>-- <br>Alessandro Pasotti<br>w3: <a href="http://www.itopen.it" target="_blank">www.itopen.it</a>
</font></span></div></div>
<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Giovanni Allegri<br>
<a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div><div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>
GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div>
</div>