Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: Using relative paths with taint mode

by ikegami (Patriarch)
on Jun 20, 2021 at 06:35 UTC ( [id://11134051]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Using relative paths with taint mode
in thread Using relative paths with taint mode

That fails for a $0 of /tmp/script.cgi. Keep in mind that a caller can provide anything they want for $0; it doesn't need to have any relation to the script whatsoever. (While true for a binary executable, it's a bit different here...)

I think it's ok if you use $RealBin instead of $Bin (which you should be doing anyway[1]), but I wouldn't rule out me overlooking something.


  1. $Bin fails when the program is launched using a symlink.

Seeking work! You can reach me at ikegami@adaelis.com

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found