From d4f84ed1ee122507730432699d04f6539c0fa469 Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Thu, 24 Sep 2009 17:17:57 +0200 Subject: [PATCH] Filter opcodes when about to being externally loaded. --- Artemus5.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Artemus5.pm b/Artemus5.pm index 8a8a1db..8d35228 100644 --- a/Artemus5.pm +++ b/Artemus5.pm @@ -162,6 +162,10 @@ sub code { if (!exists($self->{op}->{$op})) { my $src = undef; + # filter opcode to only allow + # characters valid in file names + $op =~ s/[^\w\d_-]//g; + # does a loader_func() exist? if (ref($self->{loader_func}) eq 'CODE') { $src = $self->{loader_func}->{$op}; -- 2.11.4.GIT