Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Passing a regex from a CGI HTML form [SOLVED]

by Anonymous Monk
on Sep 01, 2016 at 19:09 UTC ( [id://1171007]=note: print w/replies, xml ) Need Help??


in reply to Re: Passing a regex from a CGI HTML form [SOLVED]
in thread Passing a regex from a CGI HTML form

Bingo, all works great, and no "Danger, Will Robinson" type stuff :)

The danger is exactly the same, its string eval, see Re^2: Regex stored in a scalar ( s///eeval )

Replies are listed 'Best First'.
Re^3: Passing a regex from a CGI HTML form [SOLVED]
by Linicks (Scribe) on Sep 01, 2016 at 19:24 UTC

    Yes, but the code is simple. Secondly, all you need is a bit of 'magic' in the 'find' text box that the code looks for. If it exists then strip the 'magic' and proceed - if not, exit;

    Also, as I keep reiterating, this is a private page, on my own server, using my own code, with a hidden page that only I know ~ there really is no danger, Will Robinson'. I am not stupid.

    Nick

      Yes, but the code is simple. Secondly, all you need is a bit of 'magic' in the 'find' text box that the code looks for. If it exists then strip the 'magic' and proceed - if not, exit; Also, as I keep reiterating, this is a private page, on my own server, using my own code, with a hidden page that only I know ~ there really is no danger, Will Robinson'. I am not stupid.

      Its your choice if you want to use string eval, there is nothing to debate there, no need to justify your choice, you made the choice its yours

      but calling it "safe" or not-dangerous is dishonest stupid

        but calling it "safe" or not-dangerous is dishonest stupid"

        OK, lets put the paranoid to rest. It's my own server run from home. It's my own code. Only I know the page address. I run an HTTPS apache server latest stable build. I have configured apache to kill CGI scripts that run longer than 8 seconds. I now have a certain 'magic' that needs to be met to let the page process the perl script. It is only me that uses it.

        If that is stupid, then I am thick, not Nick

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found