Return-Path: X-Original-To: apmail-shiro-dev-archive@www.apache.org Delivered-To: apmail-shiro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E6841823B for ; Fri, 18 Mar 2016 13:21:41 +0000 (UTC) Received: (qmail 77141 invoked by uid 500); 18 Mar 2016 13:21:41 -0000 Delivered-To: apmail-shiro-dev-archive@shiro.apache.org Received: (qmail 77085 invoked by uid 500); 18 Mar 2016 13:21:33 -0000 Mailing-List: contact dev-help@shiro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shiro.apache.org Delivered-To: mailing list dev@shiro.apache.org Received: (qmail 77071 invoked by uid 99); 18 Mar 2016 13:21:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Mar 2016 13:21:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 962A92C1F64 for ; Fri, 18 Mar 2016 13:21:33 +0000 (UTC) Date: Fri, 18 Mar 2016 13:21:33 +0000 (UTC) From: "Andreas Kohn (JIRA)" To: dev@shiro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SHIRO-562) WildcardPermission calls String.trim() twice in setParts() 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/SHIRO-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15201459#comment-15201459 ] Andreas Kohn commented on SHIRO-562: ------------------------------------ Sounds reasonable, patch (if shiro wants to take it): https://github.com/Collaborne/shiro/commit/3661041b0ab6700fecfc6b6d989da95d2cc3c762 > WildcardPermission calls String.trim() twice in setParts() > ---------------------------------------------------------- > > Key: SHIRO-562 > URL: https://issues.apache.org/jira/browse/SHIRO-562 > Project: Shiro > Issue Type: Improvement > Components: Authorization (access control) > Affects Versions: 1.2.4 > Environment: any > Reporter: Matt Bishop > Priority: Trivial > > WildcardPermission.setParts does this: > {quote} > if (wildcardString == null || wildcardString.trim().length() == 0) { > throw new IllegalArgumentException("Wildcard string cannot be null or empty. Make sure permission strings are properly formatted."); > } > wildcardString = wildcardString.trim(); > {quote} > Given the frequency of the use of this method it would be better to capture the first trim(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)