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

ParametersInterceptor: param name exceeding paramNameMaxLength logs wrong message

    XMLWordPrintableJSON

    Details

      Description

      When ParametersInterceptor receives a param with a name exceeding paramNameMaxLength (default 100 chars) it logs

      Developer Notification (set struts.devMode to false to disable this message):
      Unexpected Exception caught setting 'aHR0cDovL3d3dy5qb2Jpc2pvYi5kZS9tJUMzJUJDbmNoZW4vd2Vya3N0dWRlbnQtd2lydHNjaGFmdHNpbmdlbmlldXJ3ZXNlbi9qb2Jz' on 'class java.lang.String: 100

      while looking at the code it should log

      Parameter ... is too long, allowed length is ...

      That's because there are two signatures of notifyDeveloper()

      private void notifyDeveloper(String message, String... parameters)

      protected void notifyDeveloper(Object action, String property, String message)

      the second one is hiding the first one and moreover there's no devMode check in it (it logs in production)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fustaki Lorenzo Bernacchioni
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: