-
Notifications
You must be signed in to change notification settings - Fork 739
SOLR-17742: remove handleSelect requestDispatcher option #3409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
9d0ff60
22a24ed
2beb45c
e5367b7
b47a4bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,7 +128,7 @@ public enum PluginOpts { | |
|
||
private int formUploadLimitKB; | ||
|
||
private boolean handleSelect; | ||
// private boolean handleSelect; | ||
|
||
private final SolrRequestParsers solrRequestParsers; | ||
|
||
|
@@ -363,7 +363,7 @@ private SolrConfig(SolrResourceLoader loader, String name, Properties substituta | |
log.warn("Ignored deprecated enableStreamBody in config; use sys-prop"); | ||
} | ||
|
||
handleSelect = get("requestDispatcher").boolAttr("handleSelect", false); | ||
// handleSelect = get("requestDispatcher").boolAttr("handleSelect", false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again |
||
|
||
List<PluginInfo> argsInfos = getPluginInfos(InitParams.class.getName()); | ||
if (argsInfos != null) { | ||
|
@@ -959,10 +959,7 @@ public int getFormUploadLimitKB() { | |
return formUploadLimitKB; | ||
} | ||
|
||
public boolean isHandleSelect() { | ||
return handleSelect; | ||
} | ||
|
||
/** public boolean isHandleSelect() { return handleSelect; } */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uh? |
||
@Override | ||
public Map<String, Object> toMap(Map<String, Object> result) { | ||
if (znodeVersion > -1) result.put(ZNODEVER, znodeVersion); | ||
|
@@ -1010,7 +1007,7 @@ public Map<String, Object> toMap(Map<String, Object> result) { | |
m, filterCacheConfig, queryResultCacheConfig, documentCacheConfig, fieldValueCacheConfig); | ||
m = new LinkedHashMap<>(); | ||
result.put("requestDispatcher", m); | ||
m.put("handleSelect", handleSelect); | ||
// m.put("handleSelect", handleSelect); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again |
||
if (httpCachingConfig != null) m.put("httpCaching", httpCachingConfig); | ||
m.put( | ||
"requestParsers", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,6 @@ | |
import org.apache.solr.core.CoreContainer; | ||
import org.apache.solr.core.SolrConfig; | ||
import org.apache.solr.core.SolrCore; | ||
import org.apache.solr.handler.ContentStreamHandlerBase; | ||
import org.apache.solr.request.LocalSolrQueryRequest; | ||
import org.apache.solr.request.SolrQueryRequest; | ||
import org.apache.solr.request.SolrQueryRequestBase; | ||
|
@@ -454,25 +453,18 @@ protected void extractHandlerFromURLPath(SolrRequestParsers parser) throws Excep | |
if (handler == null && path.length() > 1) { // don't match "" or "/" as valid path | ||
handler = core.getRequestHandler(path); | ||
// no handler yet but <requestDispatcher> allows us to handle /select with a 'qt' param | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and this comment is now obsolete/false There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. still should remove this comment |
||
if (handler == null && parser.isHandleSelect()) { | ||
if ("/select".equals(path) || "/select/".equals(path)) { | ||
solrReq = parser.parse(core, path, req); | ||
String qt = solrReq.getParams().get(CommonParams.QT); | ||
handler = core.getRequestHandler(qt); | ||
if (handler == null) { | ||
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "unknown handler: " + qt); | ||
} | ||
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 not supported for update | ||
// handlers. | ||
throw new SolrException( | ||
SolrException.ErrorCode.BAD_REQUEST, | ||
"Invalid Request Handler ('qt'). Do not use /select to access: " + qt); | ||
} | ||
} | ||
} | ||
/** | ||
* if (handler == null && parser.isHandleSelect()) { if ("/select".equals(path) || | ||
* "/select/".equals(path)) { solrReq = parser.parse(core, path, req); String qt = | ||
* solrReq.getParams().get(CommonParams.QT); handler = core.getRequestHandler(qt); if (handler | ||
* == null) { throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "unknown handler: " | ||
* + qt); } 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 not supported for update // handlers. throw new SolrException( | ||
* SolrException.ErrorCode.BAD_REQUEST, "Invalid Request Handler ('qt'). Do not use /select to | ||
* access: " + qt); } } } | ||
*/ | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this outright; don't leave commented