How to secured UPLOADER from XSS ??..
Collapse
X
-
XSS stands for Cross Site Scripting.. meaning to say, XSS hacking method does not need any uploader to hack a site... technically speaking it steals admin's session to hack a site using some script like session/cookie logger.. if you want to secure your site against XSS, disable java/html where user can use it .. you can use htmlspecialchars() function to secure your site in XSS hacking.. for example.. user will post like this
and will be displayed at shoutbox, for example.. your shoutbox variable is $shoutsCode:<script>alert(document.cookie);</script>
instead of this
you can do like this code below to be safe in XSS hackingCode:<? $shouts = mysql_fetch_array(mysql_query("SELECT shout FROM prefix_tablename ORDER BY time DESC LIMIT 1")); echo "Shouter: $shouts"; ?>
Code:<? $shouts = mysql_fetch_array(mysql_query("SELECT shout FROM prefix_tablename ORDER BY time DESC LIMIT 1")); echo "Shouter: ".htmlspecialchars($shouts).""; ?>
Leave a comment:
-
How to secured UPLOADER from XSS ??..
Pls help me... how to secured my uploader from XSS?...
usually XSS get the session id from the url of your browser..Tags: None
Leave a comment: