lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
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 GMT
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);
                 }
               }



Mime
View raw message