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 5879417530 for ; Tue, 6 Oct 2015 19:59:36 +0000 (UTC) Received: (qmail 35204 invoked by uid 500); 6 Oct 2015 19:59:26 -0000 Delivered-To: apmail-shiro-dev-archive@shiro.apache.org Received: (qmail 35154 invoked by uid 500); 6 Oct 2015 19:59:26 -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 35140 invoked by uid 99); 6 Oct 2015 19:59:26 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2015 19:59:26 +0000 Date: Tue, 6 Oct 2015 19:59:26 +0000 (UTC) From: "Mark Hale (JIRA)" To: dev@shiro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SHIRO-509) WebUtils.decodeAndCleanUriString incorrectly handles matrix parameters 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-509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14945659#comment-14945659 ] Mark Hale commented on SHIRO-509: --------------------------------- Yep > WebUtils.decodeAndCleanUriString incorrectly handles matrix parameters > ---------------------------------------------------------------------- > > Key: SHIRO-509 > URL: https://issues.apache.org/jira/browse/SHIRO-509 > Project: Shiro > Issue Type: Bug > Components: Web > Affects Versions: 1.2.2 > Environment: Webapp deployment in Jetty > Reporter: Mark Hale > > If I config a web filter (say anon) for a path /**/public and make a request to /mystuff;filter=toys/prices/public the filter is not triggered because WebUtils.decodeAndCleanUriString() removes everything after the ';' (so it only tries to match on /mystuff). The fix is to change > int semicolonIndex = uri.indexOf(';'); > to > int lastSlash = uri.lastIndexOf('/'); > int semicolonIndex = uri.lastIndexOf(';'); > if(semicolonIndex > lastSlash) then drop trailing matrix params. So that matrix params in parent path segments are left intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)