Skip to content
Advertisement

Tag: xss

Prevent XSS attacks when echoing HTML using PHP

I have a simple bimple function which echoes this: This just works fine, but If a user edits the HTML using a Chrome or Firefox, he can modify the code to output something like: I have set the only http on the php ini relating the cookies, but is there any way to prevent the user from modifying and successfully

string to xHH in PHP

I am curious is that any build in or easier way to encode string to xHH format in PHP? I am trying to implement rule 3 and rule 4 from XSS OWASP Prevention with build in function or easier approach. but, I can’t find any in the internet. as far as I found, I need to make manual encoder/decoder for

PHP XSS sanitization

Questions: What are the best safe1(), safe2(), safe3(), and safe4() functions to avoid XSS for UTF8 encoded pages? Is it also safe in all browsers (specifically IE6)? . Many people say the absolute best that can be done is: . . There are a hell of a lot of posts about PHP and XSS. Most just say “use HTMLPurifier” or

Advertisement