diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 62b3bf1346e..c2863b1a97d 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -85,6 +85,7 @@ Other Changes * SOLR-12753: Async logging ring buffer and OOM error. When very long messages are written (1M messages or so), it can produce an OOM error. Log messages are truncated at 10K via configuration in the log4j2.xml files. +* SOLR-9763: Remove the workaround implemented for HADOOP-12767 (Kevin Risden) ================== 8.0.0 ================== diff --git a/solr/core/src/java/org/apache/solr/security/DelegationTokenKerberosFilter.java b/solr/core/src/java/org/apache/solr/security/DelegationTokenKerberosFilter.java index 8a121686501..0184564d683 100644 --- a/solr/core/src/java/org/apache/solr/security/DelegationTokenKerberosFilter.java +++ b/solr/core/src/java/org/apache/solr/security/DelegationTokenKerberosFilter.java @@ -29,7 +29,6 @@ import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; import org.apache.curator.RetryPolicy; import org.apache.curator.framework.AuthInfo; @@ -103,18 +102,6 @@ public class DelegationTokenKerberosFilter extends DelegationTokenAuthentication @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { - // HttpClient 4.4.x throws NPE if query string is null and parsed through URLEncodedUtils. - // See HTTPCLIENT-1746 and HADOOP-12767 - HttpServletRequest httpRequest = (HttpServletRequest)request; - String queryString = httpRequest.getQueryString(); - final String nonNullQueryString = queryString == null ? "" : queryString; - HttpServletRequest requestNonNullQueryString = new HttpServletRequestWrapper(httpRequest){ - @Override - public String getQueryString() { - return nonNullQueryString; - } - }; - // include Impersonator User Name in case someone (e.g. logger) wants it FilterChain filterChainWrapper = new FilterChain() { @Override @@ -136,7 +123,7 @@ public class DelegationTokenKerberosFilter extends DelegationTokenAuthentication // A hack until HADOOP-15681 get committed Locale.setDefault(Locale.US); - super.doFilter(requestNonNullQueryString, response, filterChainWrapper); + super.doFilter(request, response, filterChainWrapper); } @Override diff --git a/solr/core/src/java/org/apache/solr/security/HadoopAuthFilter.java b/solr/core/src/java/org/apache/solr/security/HadoopAuthFilter.java index 2706a25ed1a..1b800708dd0 100644 --- a/solr/core/src/java/org/apache/solr/security/HadoopAuthFilter.java +++ b/solr/core/src/java/org/apache/solr/security/HadoopAuthFilter.java @@ -27,7 +27,6 @@ import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; import org.apache.curator.RetryPolicy; import org.apache.curator.framework.AuthInfo; @@ -79,18 +78,6 @@ public class HadoopAuthFilter extends DelegationTokenAuthenticationFilter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { - // HttpClient 4.4.x throws NPE if query string is null and parsed through URLEncodedUtils. - // See HTTPCLIENT-1746 and HADOOP-12767 - HttpServletRequest httpRequest = (HttpServletRequest)request; - String queryString = httpRequest.getQueryString(); - final String nonNullQueryString = queryString == null ? "" : queryString; - HttpServletRequest requestNonNullQueryString = new HttpServletRequestWrapper(httpRequest){ - @Override - public String getQueryString() { - return nonNullQueryString; - } - }; - // include Impersonator User Name in case someone (e.g. logger) wants it FilterChain filterChainWrapper = new FilterChain() { @Override @@ -112,7 +99,7 @@ public class HadoopAuthFilter extends DelegationTokenAuthenticationFilter { // A hack until HADOOP-15681 get committed Locale.setDefault(Locale.US); - super.doFilter(requestNonNullQueryString, response, filterChainWrapper); + super.doFilter(request, response, filterChainWrapper); } @Override @@ -232,4 +219,4 @@ public class HadoopAuthFilter extends DelegationTokenAuthenticationFilter { return ret; } } -} \ No newline at end of file +}