Return-Path: Delivered-To: apmail-incubator-roller-commits-archive@www.apache.org Received: (qmail 65523 invoked from network); 12 Oct 2006 02:13:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Oct 2006 02:13:26 -0000 Received: (qmail 66602 invoked by uid 500); 12 Oct 2006 02:13:26 -0000 Delivered-To: apmail-incubator-roller-commits-archive@incubator.apache.org Received: (qmail 66574 invoked by uid 500); 12 Oct 2006 02:13:26 -0000 Mailing-List: contact roller-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: roller-dev@incubator.apache.org Delivered-To: mailing list roller-commits@incubator.apache.org Received: (qmail 66562 invoked by uid 99); 12 Oct 2006 02:13:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2006 19:13:26 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2006 19:13:25 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 1FB701A981A; Wed, 11 Oct 2006 19:13:05 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r463109 - in /incubator/roller/trunk: src/org/apache/roller/ui/rendering/util/WeblogFeedRequest.java src/org/apache/roller/ui/rendering/util/WeblogPageRequest.java web/WEB-INF/classes/roller.properties Date: Thu, 12 Oct 2006 02:13:04 -0000 To: roller-commits@incubator.apache.org From: eliast@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061012021305.1FB701A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: eliast Date: Wed Oct 11 19:13:02 2006 New Revision: 463109 URL: http://svn.apache.org/viewvc?view=rev&rev=463109 Log: - Added configuration property for max intersection size of tags in URL requests, defaults to 3. Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogFeedRequest.java incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogPageRequest.java incubator/roller/trunk/web/WEB-INF/classes/roller.properties Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogFeedRequest.java URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogFeedRequest.java?view=diff&rev=463109&r1=463108&r2=463109 ============================================================================== --- incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogFeedRequest.java (original) +++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogFeedRequest.java Wed Oct 11 19:13:02 2006 @@ -28,6 +28,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.roller.RollerException; +import org.apache.roller.config.RollerConfig; import org.apache.roller.model.RollerFactory; import org.apache.roller.model.WeblogManager; import org.apache.roller.pojos.WeblogCategoryData; @@ -132,8 +133,9 @@ if(request.getParameter("tags") != null) { this.tags = Arrays.asList(StringUtils.split(URLUtilities.decode(request.getParameter("tags")),"+")); - if(this.tags.size() > 3) - throw new InvalidRequestException("max number of tags allowed is 3, " + request.getRequestURL()); + int maxSize = RollerConfig.getIntProperty("tags.queries.maxIntersectionSize", 3); + if(this.tags.size() > maxSize) + throw new InvalidRequestException("max number of tags allowed is " + maxSize + ", " + request.getRequestURL()); } if(request.getParameter("excerpts") != null) { Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogPageRequest.java URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogPageRequest.java?view=diff&rev=463109&r1=463108&r2=463109 ============================================================================== --- incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogPageRequest.java (original) +++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/util/WeblogPageRequest.java Wed Oct 11 19:13:02 2006 @@ -28,6 +28,9 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.roller.RollerException; +import org.apache.roller.config.RollerConfig; +import org.apache.roller.model.PropertiesManager; +import org.apache.roller.model.Roller; import org.apache.roller.model.RollerFactory; import org.apache.roller.model.UserManager; import org.apache.roller.model.WeblogManager; @@ -145,8 +148,10 @@ } else if("tags".equals(this.context)) { this.tags = Arrays.asList(StringUtils.split(pathElements[1],"+")); - if(this.tags.size() > 3) - throw new InvalidRequestException("max number of tags allowed is 3, " + request.getRequestURL()); + + int maxSize = RollerConfig.getIntProperty("tags.queries.maxIntersectionSize", 3); + if(this.tags.size() > maxSize) + throw new InvalidRequestException("max number of tags allowed is " + maxSize + ", " + request.getRequestURL()); } else { throw new InvalidRequestException("context "+this.context+ Modified: incubator/roller/trunk/web/WEB-INF/classes/roller.properties URL: http://svn.apache.org/viewvc/incubator/roller/trunk/web/WEB-INF/classes/roller.properties?view=diff&rev=463109&r1=463108&r2=463109 ============================================================================== --- incubator/roller/trunk/web/WEB-INF/classes/roller.properties (original) +++ incubator/roller/trunk/web/WEB-INF/classes/roller.properties Wed Oct 11 19:13:02 2006 @@ -453,6 +453,9 @@ debug.memory.enabled=false compression.gzipResponse.enabled=true +# specifies the max number of tags allowed in URL ( /feed?tags=foo+bar+baz ) +tags.queries.maxIntersectionSize=3 + # editor theme to be used (corresponds to directory name under /theme) editor.theme=tan