Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: a "search engine" (ahem)

by moritz (Cardinal)
on Jul 09, 2009 at 20:01 UTC ( [id://778687]=note: print w/replies, xml ) Need Help??


in reply to a "search engine" (ahem)

Use taint modus, see perlsec.

use the 3-arg form of open (see also perlopentut.

Don't interpolate $query into the HTML without HTML-escaping it first; that's a cross-site scripting vulnerability.

Replies are listed 'Best First'.
Re^2: a "search engine" (ahem)
by hnd (Scribe) on Jul 09, 2009 at 20:17 UTC
    thnx moritz but how do i HTML-escape $query and yeah the 3-arg form is more readable than this one

    =====================================================
    i'am worst at what do best and for this gift i fell blessed...
    i found it hard it's hard to find well whatever
    NEVERMIND

      Use escapeHTML from CGI. Or a template system that has the option to escape interpolated variables.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found