Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: How many bugs can *you* find

by tinman (Curate)
on May 01, 2001 at 01:30 UTC ( #76763=note: print w/replies, xml ) Need Help??

in reply to How many bugs can *you* find

Ovid, thank you for doing something like this.. I wanted to, but I suppose I never had the courage to actually try it out.. Its going to help my awareness of any bad coding practices immensely..

Ok, first thing: you're not checking the return results of *any* file open call... not for reading and not for writing.. there should always be a "or die" handler for all the open calls

Umm.. a biggie, but I don't think you're untainting any of the file name variables or the param variables that you recieve from the user... so a script kiddie style "rm -rf" hack is possible..

When you open a file for writing, you don't bother to lock (flock)it.. I've personally been bitten by a lot of flock issues when I do CGI, so I noticed this..

Your comparison (eq 'Link' || 'Pile') doesn't take into consideration a lower case submission ('link', 'pile' etc)
Update:Whoops, not so sure about this

Well, that's all I can see for now... please do tell if I've concentrated on the smaller nitpicky issues and missed any big ones...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://76763]
[marto]: this sounds like a sub section for Sane Dots
[Corion]: marto: You mean "Sane Dots Dramatic Reading of ITIL" ? ;)
[marto]: Sane Dots, chapter 13: ITIL never work :P
[marto]: sorry, bad pun of it'll :P
[Corion]: :-D
[Corion]: I think that ITIL is mostly to prevent people from doing harm to a system that basically runs unattended :)
[Corion]: Maybe you could reduce ITIL to a computer network, a man and a dog. The network runs the computations. The man is there to feed the dog. The dog is there to prevent the man from accessing the computers.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2017-01-24 10:28 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (203 votes). Check out past polls.