<div dir="ltr">Thanks for your reply.<div><br></div><div id="">Regex matching can be implemented in Database, and glob matches may not work fine with "paginate_query". However, the ReDoS you mentioned will not be avoided when using regex matching. </div>
<div id=""><br></div><div id="">I will think of it again. </div><div id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown"><br></div><div id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown">Thanks.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-28 19:04 GMT+08:00 Duncan Thomas <span dir="ltr"><<a href="mailto:duncan.thomas@gmail.com" target="_blank">duncan.thomas@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Regex matching in APIs can be a dangerous source of DoS attacks - see<br>
<a href="http://en.wikipedia.org/wiki/ReDoS" target="_blank">http://en.wikipedia.org/wiki/ReDoS</a>. Unless this is mitigated sensibly,<br>
I will continue to resist any cinder patch that adds them.<br>
<br>
Glob matches might be safer?<br>
<div class="HOEnZb"><div class="h5"><br>
On 26 April 2014 05:02, Zhangleiqiang (Trump) <<a href="mailto:zhangleiqiang@huawei.com">zhangleiqiang@huawei.com</a>> wrote:<br>
> Hi, all:<br>
><br>
> I see Nova allows search instances by name, ip and ip6 fields which can be normal string and regular expression:<br>
><br>
> [stack@leiqzhang-stack cinder]$ nova help list<br>
><br>
> List active servers.<br>
><br>
> Optional arguments:<br>
> --ip <ip-regexp> Search with regular expression match by IP address<br>
> (Admin only).<br>
> --ip6 <ip6-regexp> Search with regular expression match by IPv6 address<br>
> (Admin only).<br>
> --name <name-regexp> Search with regular expression match by name<br>
> --instance-name <name-regexp> Search with regular expression match by server name<br>
> (Admin only).<br>
><br>
> I think it is also needed for Cinder when query the volume/snapshot/backup by name. Any advice?<br>
><br>
> ----------<br>
> zhangleiqiang (Trump)<br>
><br>
> Best Regards<br>
><br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Duncan Thomas<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">-------------------<div>Best Regards</div><div><br></div><div>Trump.Zhang</div></div>
</div>