Return-Path: X-Original-To: apmail-lucene-commits-archive@www.apache.org Delivered-To: apmail-lucene-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 88E48999D for ; Sat, 31 Mar 2012 14:19:33 +0000 (UTC) Received: (qmail 88257 invoked by uid 500); 31 Mar 2012 14:19:33 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 88250 invoked by uid 99); 31 Mar 2012 14:19:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2012 14:19:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2012 14:19:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3C0AD23888FE; Sat, 31 Mar 2012 14:19:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1307810 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Date: Sat, 31 Mar 2012 14:19:12 -0000 To: commits@lucene.apache.org From: yonik@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120331141912.3C0AD23888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: yonik Date: Sat Mar 31 14:19:11 2012 New Revision: 1307810 URL: http://svn.apache.org/viewvc?rev=1307810&view=rev Log: fix qt for lazy (and other) request handlers Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1307810&r1=1307809&r2=1307810&view=diff ============================================================================== --- lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original) +++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Sat Mar 31 14:19:11 2012 @@ -29,6 +29,7 @@ import java.util.Map.Entry; import java.util.Set; import java.util.WeakHashMap; +import org.apache.solr.handler.ContentStreamHandlerBase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xml.sax.InputSource; @@ -230,9 +231,9 @@ public class SolrDispatchFilter implemen if( handler == null ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "unknown handler: "+qt); } - if( qt != null && qt.startsWith("/") && !(handler instanceof SearchHandler)) { + if( qt != null && qt.startsWith("/") && (handler instanceof ContentStreamHandlerBase)) { //For security reasons it's a bad idea to allow a leading '/', ex: /select?qt=/update see SOLR-3161 - //There was no restriction from Solr 1.4 thru 3.5 and it's now only supported for SearchHandlers. + //There was no restriction from Solr 1.4 thru 3.5 and it's not supported for update handlers. throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, "Invalid query type. Do not use /select to access: "+qt); } }