Re: best approach to clean parameters using Jsoup

2014-11-20 Thread Lukasz Lenart
Yeah... basically conversion isn't needed in that case ;-) 2014-11-20 15:32 GMT+01:00 JOSE L MARTINEZ-AVIAL : > I jsut used the annotation: > private String parameterArray[] = null; > @TypeConversion(rule= ConversionRule.COLLECTION, type = > ConversionType.CLASS, converter = "com.xxx.y

Re: best approach to clean parameters using Jsoup

2014-11-20 Thread JOSE L MARTINEZ-AVIAL
I jsut used the annotation: private String parameterArray[] = null; @TypeConversion(rule= ConversionRule.COLLECTION, type = ConversionType.CLASS, converter = "com.xxx.yyy.util.conversion. struts2.JSoupConversor") public void setParameterArray(String parameterArray[]) { this.

Re: best approach to clean parameters using Jsoup

2014-11-20 Thread Lukasz Lenart
How did you register it? 2014-11-19 12:55 GMT+01:00 JOSE L MARTINEZ-AVIAL : > Quick question here. I'm working on the approach to use a custom conversor. > It works fine for standard parameters (Just a String), but I'm having > issues when the getter receives a String[] parameters > > private

Re: best approach to clean parameters using Jsoup

2014-11-19 Thread JOSE L MARTINEZ-AVIAL
Quick question here. I'm working on the approach to use a custom conversor. It works fine for standard parameters (Just a String), but I'm having issues when the getter receives a String[] parameters private String parameter = null; @TypeConversion(type = ConversionType.CLASS, converter =

Re: best approach to clean parameters using Jsoup

2014-11-19 Thread JOSE L MARTINEZ-AVIAL
Thanks for the ideas. Overwriting retrieveParameters(ActionContext ac) method seems a good solution, although that would imply doing it to all parameters. While that could be ok, I would like to take a less aggressive approach.One option I'm considering is to user a custom Converter that could take

Re: best approach to clean parameters using Jsoup

2014-11-19 Thread Lukasz Lenart
2014-11-19 4:57 GMT+01:00 JOSE L MARTINEZ-AVIAL : > Hello, > We are using Struts 2.3.16.3 for our application. Due to security > reasons, we need to "clean" the user's input in order to avoid XSS. We are > using JSoup for that, with success( > http://jsoup.org/cookbook/cleaning-html/whitelist-san

Re: best approach to clean parameters using Jsoup

2014-11-19 Thread Christoph Nenning
> Hello, > We are using Struts 2.3.16.3 for our application. Due to security > reasons, we need to "clean" the user's input in order to avoid XSS. We are > using JSoup for that, with success( > http://jsoup.org/cookbook/cleaning-html/whitelist-sanitizer). > > The issues is that we haven't fin

best approach to clean parameters using Jsoup

2014-11-18 Thread JOSE L MARTINEZ-AVIAL
Hello, We are using Struts 2.3.16.3 for our application. Due to security reasons, we need to "clean" the user's input in order to avoid XSS. We are using JSoup for that, with success( http://jsoup.org/cookbook/cleaning-html/whitelist-sanitizer). The issues is that we haven't find a really good