projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e27ca9c
)
Fixed eval of in modules with -
author
Jamie Cameron
<jcameron@webmin.com>
Tue, 17 Apr 2007 00:39:56 +0000
(
00:39
+0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Tue, 17 Apr 2007 00:39:56 +0000
(
00:39
+0000)
fastrpc.cgi
patch
|
blob
|
history
diff --git
a/fastrpc.cgi
b/fastrpc.cgi
index
3bfb9ef
..
5557db6
100755
(executable)
--- a/
fastrpc.cgi
+++ b/
fastrpc.cgi
@@
-232,7
+232,9
@@
while(1) {
print STDERR "fastrpc: eval $arg->{'module'} $arg->{'code'}\n" if ($gconfig{'rpcdebug'});
local $rv;
if ($arg->{'module'}) {
- $rv = eval "package $arg->{'module'};\n".
+ local $pkg = $arg->{'module'};
+ $pkg =~ s/[^A-Za-z0-9]/_/g;
+ $rv = eval "package $pkg;\n".
$arg->{'code'}."\n";
}
else {