in reply to Re: Untaint a string match, regular expression.
in thread Untaint a string match, regular expression.
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Untaint a string match, regular expression.
by Anonymous Monk on May 18, 2015 at 00:17 UTC | |
by cheako (Beadle) on May 18, 2015 at 00:33 UTC | |
by Anonymous Monk on May 18, 2015 at 00:48 UTC | |
by cheako (Beadle) on May 18, 2015 at 01:00 UTC | |
by Anonymous Monk on May 18, 2015 at 01:11 UTC |