in reply to Re: Re (tilly) 2: Opinions needed on CGI security
in thread Opinions needed on CGI security

Thank you all for the comments so far.

The program is a message board, so the only time the user data is used directly is when a page is generated.
I was trying to use the method of specifying what I will allow as mentioned by Merlin. Of all the potential input fields, there are 4 that I had to specify what I won't allow instead of what I will allow. This is because these fields can contain HTML. Since there are a lot of acceptable tags I thought it prudent to specify the ones I don't want.

I've read all I can find on security with CGI's and never found much that directly related to my program, but after seeing all the different methods used to attack a program I thought I'd better do some basic filtering.
This problem grew because I don't spend my time trying to break other peoples code, I am probably unaware of common "hack" attempts.

I know my code leave it possible to have an unbalanced tag like the <table> tag and thus the generated page may not display but I haven't found any method that will match opening and closing tags.

In the hopes that I'm not becoming completly paranoid, is there any standard filtering that I'm not using to minimize vulnerability ?

Thanks for all the advice, you guys will make a programmer out of me yet!

-- Brian