F
FangQ
hi
I don't know if this is possible in perl. Basically, I had a cgi script
written in perl (based on UseModWiki), I want to allow users to define
customized rules to automatically modify the associated wiki pages.
These rules are defined in a normal wiki page, and are read and
executed (use eval() ) when user browse other wiki pages that are
associated with this rule file.
my question is, since users can write any valid perl script in these
rule files, I don't know if there is a way to limit the variables that
users can modify, say only those within the caller. I also don't want
user to do any file io operations. is this possible with eval?
a simpler but similar example can be found for $EarlyRules and
$LateRules, see
http://www.usemod.com/cgi-bin/wiki.pl?LateRules
and the actual eval is in sub EvalLocalRules() in
http://www.usemod.com/wikicode/usemod10.tar.gz
thanks
Qianqian
I don't know if this is possible in perl. Basically, I had a cgi script
written in perl (based on UseModWiki), I want to allow users to define
customized rules to automatically modify the associated wiki pages.
These rules are defined in a normal wiki page, and are read and
executed (use eval() ) when user browse other wiki pages that are
associated with this rule file.
my question is, since users can write any valid perl script in these
rule files, I don't know if there is a way to limit the variables that
users can modify, say only those within the caller. I also don't want
user to do any file io operations. is this possible with eval?
a simpler but similar example can be found for $EarlyRules and
$LateRules, see
http://www.usemod.com/cgi-bin/wiki.pl?LateRules
and the actual eval is in sub EvalLocalRules() in
http://www.usemod.com/wikicode/usemod10.tar.gz
thanks
Qianqian