Guys - is there a way to customise the Decorator autogenerated. In veracode we are getting the following highlighted in the autogenerated decorator.
CW Improper neutralization of script-related html tags
Basically we need to neutralization the tags in a manner such as
StringEscapeUtils.escapeHtml(exposedField)
for all the arguments on the autogenerated message
so current behaviour is
return this.myDelegate.getStuff(exposedField1, exposedField2)
need this
return this.myDelegate.getStuff(StringEscapeUtils.escapeHtml(exposedField1), StringEscapeUtils.escapeHtml(exposedField2))
Would appreciate any advice - would have thought this issue to be very common (especially in large corporate organisations)
Ideally a flag I suppose to switch this on/off (toggle the behaviour above..)?
Guys - is there a way to customise the Decorator autogenerated. In veracode we are getting the following highlighted in the autogenerated decorator.
CW Improper neutralization of script-related html tags
Basically we need to neutralization the tags in a manner such as
StringEscapeUtils.escapeHtml(exposedField)
for all the arguments on the autogenerated message
so current behaviour is
return this.myDelegate.getStuff(exposedField1, exposedField2)
need this
return this.myDelegate.getStuff(StringEscapeUtils.escapeHtml(exposedField1), StringEscapeUtils.escapeHtml(exposedField2))
Would appreciate any advice - would have thought this issue to be very common (especially in large corporate organisations)
Ideally a flag I suppose to switch this on/off (toggle the behaviour above..)?