Is the code below effective in disallowng submission of an altered form?
No! It is just as easy to alter the headers as it is to alter the form. You shouldn't focus on whether you think the user changed the form. Instead focus on what values your script expects and make sure that you check those values before you use them.
Whether or not the user changed the form is irrelevant as long as you only use the parameters that you expect to recieve in your script, and that those parameters contain values that are within your given constraints.
I would suggest you do some reading on CGI programming and security. A good place to start is probably Ovid's CGI course. Or check out some of the other CGI Tutorials here at the monestary.
- Cees
In reply to Re: CGI form data validation
by cees
in thread CGI form data validation
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |