You can currently create a 500 error on mysql by passing | as the name
filter because mysql assumes regex values are well crafted by the
application layer.
This puts in facilities to provide a safe regex filter per db engine.
It also refactors some of the inline code from _regex_instance_filter
into slightly more logical blocks, which will make it a little more
straight forward about where we need to do something smarter about
determining the dbtype in a cellsv2 world.
Reviewed: https:/ /review. openstack. org/282190 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=117fad897d5 310d66cc2e690f3 cd32e72614d8fd
Committed: https:/
Submitter: Jenkins
Branch: master
commit 117fad897d5310d 66cc2e690f3cd32 e72614d8fd
Author: jichenjc <email address hidden>
Date: Fri Feb 26 12:52:07 2016 +0800
Refactor REGEX filters to eliminate 500 errors
You can currently create a 500 error on mysql by passing | as the name
filter because mysql assumes regex values are well crafted by the
application layer.
This puts in facilities to provide a safe regex filter per db engine.
It also refactors some of the inline code from _regex_ instance_ filter
into slightly more logical blocks, which will make it a little more
straight forward about where we need to do something smarter about
determining the dbtype in a cellsv2 world.
Change-Id: Ice2e21666905fd b76c001195e8fca 21b427ea737
Closes-Bug: 1546396