Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Is this code secure, can I test it on my machine?

by ikegami (Pope)
on May 23, 2010 at 19:25 UTC ( #841276=note: print w/replies, xml ) Need Help??


in reply to Re^2: Is this code secure, can I test it on my machine?
in thread Is this code secure, can I test it on my machine?

string eval is already flagged as dangerous spot and "use" too

I missed the mention of string eval. As for the use re 'eval';, it's not prevented by preventing the use of use as I suspect you can achieve the same effect without actually using use.

The new thing here is substitution with two "e"-s:

It's really just another way of writing a string eval.

s/.../.../ee
is the same as
s/.../eval "..."/e

(without making '"' special).

Do I understand correctly that a single e after the substitution would only be dangerous if the code inside is dangerous

If you consider $1 safe in code, then s/.../$1/e is safe too.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://841276]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2018-09-19 08:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (163 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!