I think it would be trivial to write a subroutine in perl that takes a string and splits it on '^', '$', '.*' and then recombines the string as a regex, with the rest of the string regex escaped.
The above would allow for user to specify a regex and be secure for untrusted users. This can also be expanded to include many more features.
In reply to Re^2: Untaint a string match, regular expression.
by cheako
in thread Untaint a string match, regular expression.
by cheako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |