A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy.Cross-site scripting carried out on websites accounted for roughly 84% of all security vulnerabilities documented by Symantec as of 2007.
Security on the web depends on a variety of mechanisms, including an underlying concept of trust known as the same-origin policy.
Cade Cairns Cade Cairns is a software developer with a passion for security.
He has experience leading teams creating everything from enterprise applications to security testing software, mobile applications, and software for embedded devices.
A Java Script check is useful because it stops the form from being submitted if there is a problem, saving lots of time for your readers.
The CGI script is still more reliable, as it always works regardless of whether Java Script is enabled on the client-side or not; but having this extra safety barrier is a nice thing to have in place.