You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Andreas Wolf (JIRA)" <ji...@apache.org> on 2014/05/28 13:54:01 UTC
[jira] [Updated] (WW-4354) ParametersInterceptor's
isWithinLengthLimit() method irgnores devMode
[ https://issues.apache.org/jira/browse/WW-4354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Wolf updated WW-4354:
-----------------------------
Description:
In the Class com.opensymphony.xwork2.interceptor.ParametersInterceptor
the method isWithinLengthLimit( String name ) does not consider the devMode flag.
{code}
protected boolean isWithinLengthLimit( String name ) {
boolean matchLength = name.length() <= paramNameMaxLength;
if (!matchLength) {
notifyDeveloper("Parameter [#0] is too long, allowed length is [#1]", name, String.valueOf(paramNameMaxLength));
}
return matchLength;
}
{code}
As a result, an ERROR is logged when a Paramter is too long.
E.g.
[com.opensymphony.xwork2.interceptor.ParametersInterceptor] [Developer Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting '****' on 'class java.lang.String: 100]
was:
In the Class com.opensymphony.xwork2.interceptor.ParametersInterceptor
the method isWithinLengthLimit( String name ) does not consider the devMode Flag.
{code}
protected boolean isWithinLengthLimit( String name ) {
boolean matchLength = name.length() <= paramNameMaxLength;
if (!matchLength) {
notifyDeveloper("Parameter [#0] is too long, allowed length is [#1]", name, String.valueOf(paramNameMaxLength));
}
return matchLength;
}
{code}
As a result, an ERROR is logged when a Paramter is too long.
E.g.
[com.opensymphony.xwork2.interceptor.ParametersInterceptor] [Developer Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting '****' on 'class java.lang.String: 100]
> ParametersInterceptor's isWithinLengthLimit() method irgnores devMode
> ---------------------------------------------------------------------
>
> Key: WW-4354
> URL: https://issues.apache.org/jira/browse/WW-4354
> Project: Struts 2
> Issue Type: Bug
> Components: Core Interceptors
> Affects Versions: 2.3.16.3
> Reporter: Andreas Wolf
>
> In the Class com.opensymphony.xwork2.interceptor.ParametersInterceptor
> the method isWithinLengthLimit( String name ) does not consider the devMode flag.
> {code}
> protected boolean isWithinLengthLimit( String name ) {
> boolean matchLength = name.length() <= paramNameMaxLength;
> if (!matchLength) {
> notifyDeveloper("Parameter [#0] is too long, allowed length is [#1]", name, String.valueOf(paramNameMaxLength));
> }
> return matchLength;
> }
> {code}
> As a result, an ERROR is logged when a Paramter is too long.
> E.g.
> [com.opensymphony.xwork2.interceptor.ParametersInterceptor] [Developer Notification (set struts.devMode to false to disable this message):
> Unexpected Exception caught setting '****' on 'class java.lang.String: 100]
--
This message was sent by Atlassian JIRA
(v6.2#6252)