AMathuria172594 (Community Member) asked a question.

To resolve
Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) (CWE ID
80)

We are trying to use

org.owasp.esapi.ESAPI.validator().getValidInput(String context, String input, String type, int maxLength, boolean allowNull)

/**

 * Validates data received from the browser and returns a safe version.

 * Double encoding is treated as an attack. The default encoder supports

 * html encoding, URL encoding, and javascript escaping. Input is

 * canonicalized by default before validation.

 *

 * @param context A descriptive name for the field to validate. This is used for error facing validation messages and element identification.

 * @param input The actual user input data to validate.

 * @param type The regular expression name which maps to the actual regular expression from "ESAPI.properties".

 * @param maxLength The maximum post-canonicalized String length allowed.

 * @param allowNull If allowNull is true then a input that is NULL or an empty string will be legal. If allowNull is false then NULL or an empty String will throw a ValidationException.

 * @return The canonicalized user input.

 * @throws ValidationException

 * @throws IntrusionException

 */

but Veracode doesn't accepting as a solution to resolve this vulnerability

We would like to what is missing here?


Topics (2)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.