Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: prevent perl script running from browser

by marto (Cardinal)
on Oct 01, 2017 at 09:47 UTC ( [id://1200453]=note: print w/replies, xml ) Need Help??


in reply to Re^3: prevent perl script running from browser
in thread prevent perl script running from browser

You alter/assign referrer, either in perl scripting or browser plugin.

  • Comment on Re^4: prevent perl script running from browser

Replies are listed 'Best First'.
Re^5: prevent perl script running from browser
by afoken (Chancellor) on Oct 01, 2017 at 10:15 UTC
    You alter/assign referrer, either in perl scripting or browser plugin.

    Yes, but that does not matter. The idea is that $ENV{'HTTP_REFERER'} is set to some nonsense only if running as CGI. Unfortunately, this is not entirely true. Clients can choose not to send a Referer header, so you might run a CGI with $ENV{'HTTP_REFERER'} not set. Using $ENV{'GATEWAY_INTERFACE'} should be reliable. It is set by the webserver, it is always set, and it is set to a constant value independent from the HTTP request.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      All of this seems moot to me. I can't think of a scenario where having something only to be run locally is hosted in this way.

        How about this scenario. The script takes plain text from forms input as a parameter and encrypts it using GnuPg then emails the result to us. So yes it would be nice if it were not public accessible from a browser.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-04-24 10:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found