Difference between revisions of "AppSensor DetectionPoint IE1"

From OWASP
Jump to: navigation, search
(Sample code for testing for XSS attack)
 
m
 
Line 4: Line 4:
 
String myInputParameter = ...;
 
String myInputParameter = ...;
  
//the execution of this line will throw an exception if an attack is found  
+
//the execution of this line will create an exception if an attack is found  
 
boolean isAttack = AttackDetectorUtils.verifyXSSAttack(myInputParameter);  
 
boolean isAttack = AttackDetectorUtils.verifyXSSAttack(myInputParameter);  
 
if (isAttack) {
 
if (isAttack) {

Latest revision as of 14:16, 4 June 2010

Here is some sample code that can be used to detect IE1.

String myInputParameter = ...;

//the execution of this line will create an exception if an attack is found 
boolean isAttack = AttackDetectorUtils.verifyXSSAttack(myInputParameter); 
if (isAttack) {
    notify user ... ???
}