Normally i scan my code changes using veracode to detect security vulnerabilities. Now there is a string in DB which i am collecting in a string called custFunctionality
and previously i was displaying this in jsp as :
out.println(<%= custFunctionality %>);
Well veracode scanned it and let me know that it constitutes a security defect.
So i used c: out
here as :
<c:out escapexml='false' value='${custFunctionality }'/>
Now the problem here is that the string consists of html related mark up and special characters which i need to show in the page and if i don't give escapexml='false'
those characters and mark ups don't materialize. However, since there is escapexml='false'
string here in the code, this constitutes a security defect for veracode as i found it out after re scanning the file.
Can anyone suggest me an alternate solution out of this quagmire ?