Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA3FCF0F6 for ; Wed, 28 May 2014 12:10:01 +0000 (UTC) Received: (qmail 34129 invoked by uid 500); 28 May 2014 12:10:01 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 34093 invoked by uid 500); 28 May 2014 12:10:01 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 34086 invoked by uid 99); 28 May 2014 12:10:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2014 12:10:01 +0000 Date: Wed, 28 May 2014 12:10:01 +0000 (UTC) From: "Andreas Wolf (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4354) ParametersInterceptor's isWithinLengthLimit() method ignores devMode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-4354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011045#comment-14011045 ] Andreas Wolf commented on WW-4354: ---------------------------------- The isWithinLengthLimit method uses another notifyDeveloper Method: {code} protected void notifyDeveloper(Object action, String property, String message) { String developerNotification = LocalizedTextUtil.findText(ParametersInterceptor.class, "devmode.notification", ActionContext.getContext().getLocale(), "Developer Notification:\n{0}", new Object[]{ "Unexpected Exception caught setting '" + property + "' on '" + action.getClass() + ": " + message } ); LOG.error(developerNotification); // see https://issues.apache.org/jira/browse/WW-4066 if (action instanceof ValidationAware) { Collection messages = ((ValidationAware) action).getActionMessages(); messages.add(message); ((ValidationAware) action).setActionMessages(messages); } } {code} This method ignores devMode! > ParametersInterceptor's isWithinLengthLimit() method ignores 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 > Fix For: 2.3.18 > > > 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)