hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject httpcomponents-client git commit: HTTPCLIENT-1904: check cookie domain for null
Date Fri, 09 Feb 2018 10:56:05 GMT
Repository: httpcomponents-client
Updated Branches:
  refs/heads/4.5.x 97b5055cc -> c215bc7bb


HTTPCLIENT-1904: check cookie domain for null


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/c215bc7b
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/c215bc7b
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/c215bc7b

Branch: refs/heads/4.5.x
Commit: c215bc7bb5f1aae9387c420c5b668ec3c5830b05
Parents: 97b5055
Author: Hans-Peter Keck <hans-peter.keck@haufe-lexware.com>
Authored: Fri Feb 9 10:21:59 2018 +0100
Committer: Hans-Peter Keck <hans-peter.keck@haufe-lexware.com>
Committed: Fri Feb 9 10:21:59 2018 +0100

----------------------------------------------------------------------
 .../org/apache/http/impl/cookie/PublicSuffixDomainFilter.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/c215bc7b/httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java
----------------------------------------------------------------------
diff --git a/httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java
b/httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java
index 24d3728..47c3007 100644
--- a/httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java
+++ b/httpclient/src/main/java/org/apache/http/impl/cookie/PublicSuffixDomainFilter.java
@@ -90,6 +90,9 @@ public class PublicSuffixDomainFilter implements CommonCookieAttributeHandler
{
     @Override
     public boolean match(final Cookie cookie, final CookieOrigin origin) {
         final String host = cookie.getDomain();
+        if (host == null) {
+            return false;
+        }
         final int i = host.indexOf('.');
         if (i >= 0) {
             final String domain = host.substring(i);


Mime
View raw message