On Tue, Mar 29, 2005 at 08:38:29AM -0500, Guest via RT wrote:
Show quoted text>
> The FriendsPhotos.pm example application has a XSS bug due to passing
> the msg through the uri. This was discussed recently on the CGI::App
> list and one possible solution would be to use a code that selects the
> message to be displayed rather than displaying raw input from the url.
Thanks for the note, William.
Would I be correct that there are two levels of solution here:
1. Simply escapeHTML() the msg when it comes in. It's possible someone
could still adjust the page to look silly, but can't really alter the
HTML or JavaScript in the page. If I don't care if the page can be made
to look silly, this is enough.
2. Use the solution you recommend: Pass codes which can't be usefully
altered.
Mark