This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new a57bbfcf7d4 SOLR-17417: Remove unecessary code in PKIAuthPlugin and
HttpSolrCall
a57bbfcf7d4 is described below
commit a57bbfcf7d4bbd172c4d55e2c88b6cfa2080869f
Author: Houston Putman <[email protected]>
AuthorDate: Fri Aug 23 12:12:44 2024 -0500
SOLR-17417: Remove unecessary code in PKIAuthPlugin and HttpSolrCall
(cherry picked from commit 7ef2c0ef36601d8ce8c83192738376ed7c2429ac)
---
solr/CHANGES.txt | 2 ++
.../java/org/apache/solr/security/PKIAuthenticationPlugin.java | 9 ---------
solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java | 9 +--------
3 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d1ac2eded11..39b35e84ee9 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -179,6 +179,8 @@ Bug Fixes
Shard splits and concurrent/large collection backup/restore performance was
serial. UpdateLog
replay was a little suboptimal in thread usage too. (Pierre Salagnac, Hakan
Özler, David Smiley)
+* SOLR-17417: Remove unnecessary code in PKIAuthPlugin and HttpSolrCall
(Houston Putman, janhoy, Liu Huajin)
+
Dependency Upgrades
---------------------
(No changes)
diff --git
a/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
b/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
index 0b966e5419a..b1f6e6b6eed 100644
--- a/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
+++ b/solr/core/src/java/org/apache/solr/security/PKIAuthenticationPlugin.java
@@ -141,15 +141,6 @@ public class PKIAuthenticationPlugin extends
AuthenticationPlugin
// Getting the received time must be the first thing we do, processing the
request can take time
long receivedTime = System.currentTimeMillis();
- String requestURI = request.getRequestURI();
- if (requestURI.endsWith(PublicKeyHandler.PATH)) {
- assert false : "Should already be handled by
SolrDispatchFilter.authenticateRequest";
-
- numPassThrough.inc();
- filterChain.doFilter(request, response);
- return true;
- }
-
PKIHeaderData headerData = null;
String headerV2 = request.getHeader(HEADER_V2);
String headerV1 = request.getHeader(HEADER);
diff --git a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
index cfa81f40c47..16bd180815f 100644
--- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
+++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
@@ -219,13 +219,6 @@ public class HttpSolrCall {
queryParams = SolrRequestParsers.parseQueryString(req.getQueryString());
- // unused feature ?
- int idx = path.indexOf(':');
- if (idx > 0) {
- // save the portion after the ':' for a 'handler' path parameter
- path = path.substring(0, idx);
- }
-
// Check for container handlers
handler = cores.getRequestHandler(path);
if (handler != null) {
@@ -237,7 +230,7 @@ public class HttpSolrCall {
}
// Parse a core or collection name from the path and attempt to see if
it's a core name
- idx = path.indexOf('/', 1);
+ int idx = path.indexOf('/', 1);
if (idx > 1) {
origCorename = path.substring(1, idx);