Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
The main you need to know about cross site scripting is that any time a form submits data or a query contains data which is then displayed on the page, that data should first be escaped in some way before being displayed. The main functions used for this are:
1. strip_tags() to remove HTML characters in favor of plain text
2. htmlspecialchars() or htmlentities() to display HTML in a way that is readable, but won't be interpreted by the browser.
The other big thing is that you should keep the register_globals in php.ini turned OFF. It is off by default now days, but it didn't used to be, and a lot of servers still keep it on. This was a very poorly thought out directive as it allows anyone to take over any empty variable on the page by simply querying it ?var=value.
XSS, if successful, lets malicious users do all sorts of nasty things.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|