Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4354

ParametersInterceptor's isWithinLengthLimit() method ignores devMode

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.3.16.3
    • Fix Version/s: 2.3.20
    • Component/s: Core Interceptors
    • Labels:
      None

      Description

      In the Class com.opensymphony.xwork2.interceptor.ParametersInterceptor
      the method isWithinLengthLimit( String name ) does not consider the devMode flag.

      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;
      }
      

      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]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andreaswolf Andreas Wolf
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: