Return-Path: X-Original-To: apmail-struts-commits-archive@minotaur.apache.org Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D67811D3C for ; Mon, 5 May 2014 04:45:14 +0000 (UTC) Received: (qmail 19367 invoked by uid 500); 5 May 2014 04:44:50 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 19266 invoked by uid 500); 5 May 2014 04:44:49 -0000 Mailing-List: contact commits-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 commits@struts.apache.org Received: (qmail 19175 invoked by uid 99); 5 May 2014 04:44:47 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2014 04:44:47 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2EFEF90D562; Mon, 5 May 2014 04:44:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lukaszlenart@apache.org To: commits@struts.apache.org Date: Mon, 05 May 2014 04:44:49 -0000 Message-Id: In-Reply-To: <49a1ac298425432bac8d26c840bf7877@git.apache.org> References: <49a1ac298425432bac8d26c840bf7877@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/19] git commit: Moves global exclude patterns into dedicated class Moves global exclude patterns into dedicated class Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/2e2da292 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/2e2da292 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/2e2da292 Branch: refs/heads/feature/exclude-object-class Commit: 2e2da292166adbc78c4cb1e308b30ddb4fba6d3f Parents: a2d0ecd Author: Lukasz Lenart Authored: Thu Apr 24 19:51:02 2014 +0200 Committer: Lukasz Lenart Committed: Thu Apr 24 19:51:02 2014 +0200 ---------------------------------------------------------------------- core/src/main/resources/struts-default.xml | 8 +++---- .../opensymphony/xwork2/ExcludedPatterns.java | 22 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/2e2da292/core/src/main/resources/struts-default.xml ---------------------------------------------------------------------- diff --git a/core/src/main/resources/struts-default.xml b/core/src/main/resources/struts-default.xml index 2f5b259..398dd43 100644 --- a/core/src/main/resources/struts-default.xml +++ b/core/src/main/resources/struts-default.xml @@ -197,7 +197,7 @@ - ^class\..*,^dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,^parameters\..*,^action:.*,^method:.* + ^action:.*,^method:.* @@ -253,7 +253,7 @@ - ^class\..*,^dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,^parameters\..*,^action:.*,^method:.* + ^action:.*,^method:.* @@ -263,7 +263,7 @@ - ^class\..*,^dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,^parameters\..*,^action:.*,^method:.* + ^action:.*,^method:.* @@ -300,7 +300,7 @@ - ^class\..*,^dojo\..*,^struts\..*,^session\..*,^request\..*,^application\..*,^servlet(Request|Response)\..*,^parameters\..*,^action:.*,^method:.* + ^action:.*,^method:.* http://git-wip-us.apache.org/repos/asf/struts/blob/2e2da292/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatterns.java ---------------------------------------------------------------------- diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatterns.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatterns.java new file mode 100644 index 0000000..b618a52 --- /dev/null +++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ExcludedPatterns.java @@ -0,0 +1,22 @@ +package com.opensymphony.xwork2; + +/** + * ExcludedPatterns contains hard-coded patterns that must be rejected by {@link com.opensymphony.xwork2.interceptor.ParametersInterceptor} + * and partially in CookInterceptor + */ +public class ExcludedPatterns { + + public static final String CLASS_ACCESS_PATTERN = "(.*\\.|^|.*|\\[('|\"))class(\\.|('|\")]|\\[).*"; + + public static final String[] EXCLUDED_PATTERNS = { + CLASS_ACCESS_PATTERN, + "^dojo\\..*", + "^struts\\..*", + "^session\\..*", + "^request\\..*", + "^application\\..*", + "^servlet(Request|Response)\\..*", + "^parameters\\..*" + }; + +}