YNOT
  • Home
  • Industry News
    • Adult Business News
    • Adult Novelty News
    • YNOT Magazine
    • EU News
    • Opinions
    • Picture Galleries
  • PR Wire
    • Adult Company News
    • Adult Retail News
    • Adult Talent News
    • Adult Videos News
  • Podcasts
  • Industry Guides
    • Adult Affiliate Guide
    • Affiliate Marketing for Beginners
    • Top Adult Traffic Networks
    • Top Adult PR Agents
    • Funding an Adult Business
  • Business Directory
    • View Categories
    • View Listings
    • Submit Listing
  • Newsletters
  • Industry Events
    • Events Calendar
    • YNOT Cam Awards | Hollywood
    • YNOT Awards | Prague
    • YNOT Cammunity
    • YNOT Summit
    • YNOT Reunion
  • Login with YNOT ID
YNOT University: Educational articles and tutorials

Perl, CGI and Secure Coding

Posted On 08 May 2000
By : admin

After a recent post on our message board and reading up a little bit here and there, I figured
I’d go ahead and write an article on security for a change. Most of us (programmers that is)
already know what I’m about to write (or they -should- know) but for newbies it might
be interesting.

First of all, is Perl a secure language? That really depends on the programmer.After a recent post on our message board and reading up a little bit here and there, I figured
I’d go ahead and write an article on security for a change. Most of us (programmers that is)
already know what I’m about to write (or they -should- know) but for newbies it might
be interesting.

First of all, is Perl a secure language? That really depends on the programmer. It’s the same
as driving really, you can either drive like a maniac or drive defensively. It’s the same
with Perl programs. If you code like a maniac without thinking about what your code
actually does, well, let’s just say the results could be ugly.

Case in point, the message on the messageboard pointed out a rather simple flaw. Simple, yes,
far-fetching results, hell yes. I tried fiddling with it and ended up with a copy of /etc/passwd
(the Unix password file). In itself not that big of a deal, but still it’s information you
don’t want just anyone to read.

Here’s the trick to secure coding: Think. If you think about what your code does, where
the input from form fields goes, what’s done with the output, you are half way there.
The other 50% of the secure coding exercise is using Perl’s taint checking (the -t flag).
Taint checking will die() your script with an error if you are using data that is ‘contaminated’.
Contaminated means that it’s unchecked, and might (or might not) contain data that will get
you a whole lot of other results than the ones you hoped for.

Since taint checking is a rather long-winded subject, I’d like to refer everyone to their
perl documentation (those files you never read 😉 and read up on it.

Also, remember, shell commands are fun, but might cause some very serious security holes. Things
like executing shell commands using backticks or the system() call. If someone puts the
appropriate characters in that string, bad voodoo is going to come over your script. I won’t give
you detailed instructions, after all, this is not a course on hacking but an article on how
to code securely.

And so it ends, the main point here is that you should think about what your script does,
visualise it’s flow in your head, and work from there. If you have any more questions, feel
free to contact me at madcat@perlcoders.com

  • google-share
Previous Story

An Introduction to Copyright Law

Next Story

Get Focused: Designing for the Customer Experience

Leave a Reply Cancel reply

You must be logged in to post a comment.

Sponsor

YNOT Shoot Me

YNOTShootMe.com has exclusive pics from adult industry business events. Check it out!

YNOT Directory

  • Rabbit’s Reviews
    Marketing & Traffic Services
  • Kink.com
    Paysite Affiliate Programs
  • XXX Trailers
    Online Content Providers
  • Premiere Listing

    TrafficStars

    More Details

RECENT

POPULAR

COMMENTS

Jasmine Sherni Guests on Holly Randall Unfiltered

Posted On 29 Aug 2025
Motorbunny Announces “Date Night Challenge” Sweepstakes

Motorbunny Announces “Date Night Challenge” Sweepstakes

Posted On 29 Aug 2025
Grooby Drops “Black-TGirls Jizz Jam #26”

Grooby Drops “Black-TGirls Jizz Jam #26”

Posted On 29 Aug 2025

Vanessa, Meet Vivid

Posted On 29 Sep 2014
Laila Mickelwaite and Exodus Cry

Laila Mickelwaite, Exodus Cry and their Crusade Against Porn

Posted On 03 May 2021

Someone puts Gal Gadot in one of your vids? Take it down!

Posted On 13 Dec 2017

Hoping viewers can also enjoy a spooky...

Posted On 24 Oct 2023

now a days these type of games will get...

Posted On 17 Jul 2023

good move from adent. these type of...

Posted On 06 Jul 2023

Sponsor

Sitemap
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy Policy