struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: "/" character an invalid key?
Date Thu, 07 Jul 2011 14:12:59 GMT
Oh, can't you just set the parameter then?

Dave

On Thu, Jul 7, 2011 at 8:35 AM, Eric Lentz <Eric.Lentz@sherwin.com> wrote:
>>> Do we call this a bug?
>>
>>Probably, but I don't if it's an S2 or OGNL issue.
>>
>>Dave
>
> com.opensymphony.xwork2.interceptor.ParametersInterceptor
>
> private String acceptedParamNames = "[a-zA-Z0-9\\.\\]\\[\\(\\)_'\\s]+";
> private Pattern acceptedPattern = Pattern.compile(acceptedParamNames);
> ...
>
>    protected boolean acceptableName(String name) {
>        if (isAccepted(name) && !isExcluded(name)) {
>            return true;
>        }
>        return false;
>    }
>    protected boolean isAccepted(String paramName) {
>        if (!this.acceptParams.isEmpty()) {
>            for (Pattern pattern : acceptParams) {
>                Matcher matcher = pattern.matcher(paramName);
>                if (matcher.matches()) {
>                    return true;
>                }
>            }
>            return false;
>        } else
>            return acceptedPattern.matcher(paramName).matches();
>    }
>
> Using the sample app. the debugger lands on "return false" in
> acceptableName and never makes it to isExcluded, so isAccepted appears to
> be where it gets stopped (returns false). That must be on account of what
> is considered "acceptedParamNames".

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message