I am writing a script which accepts user input from a Web form. Most input I can untaint with no problem. I have problems with two types, though. Users can enter URLs and descriptions for the URLs. The URLs will be written out to a flat file and sometimes printed to a Web page. Usually, they will be used to redirect a browser. The descriptions will also be written out to a flat file and sometimes printed to a Web page.
My question: What sort of taint checking needs to be done for information which is just being written to a file and sometimes printed to a Web page? This information will not be used in any other way. Are there any security problems with this?
Are there any security problems with using user-entered URLs for redirection? In other words, Joe can only be redirected to URL's that Joe entered.
Any and all assistance would be greatly appreciated!!!
In reply to Untainting URLs and their descriptions by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |