in reply to how to restrict a regexp?
The constructs that can contain code ((?{...}) and (??{...})) cannot be interpolated into a regexp by default. So as long as use re 'eval'; isn't used, they won't be able to execute arbitrary code.
However! It is possible for them to construct a regexp that will take until the death of the universe to process, causing a denial of service if left unchecked.
It's also possible to create a regexp that crashes Perl (by overflowing the stack, IIRC). That particular issue has been fixed in 5.10, I believe.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to restrict a regexp?
by moritz (Cardinal) on Mar 17, 2008 at 11:18 UTC | |
by tfoertsch (Beadle) on Mar 17, 2008 at 12:15 UTC | |
by Your Mother (Archbishop) on Mar 17, 2008 at 16:47 UTC | |
by ikegami (Patriarch) on Mar 17, 2008 at 23:45 UTC |