You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2020/01/25 15:11:25 UTC

[GitHub] [httpcomponents-client] ok2c opened a new pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier

ok2c opened a new pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier
URL: https://github.com/apache/httpcomponents-client/pull/203
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier

Posted by GitBox <gi...@apache.org>.
ok2c commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier
URL: https://github.com/apache/httpcomponents-client/pull/203#discussion_r370992858
 
 

 ##########
 File path: httpclient/src/test/java/org/apache/http/conn/ssl/TestDefaultHostnameVerifier.java
 ##########
 @@ -417,4 +419,28 @@ public void testExtractCN() throws Exception {
         }
     }
 
+    @Test
+    public void testMatchDNSName() throws Exception {
+        DefaultHostnameVerifier.matchDNSName(
+                "host.domain.com",
+                Collections.singletonList(SubjectName.DNS("*.domain.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.xx",
+                Collections.singletonList(SubjectName.DNS("*.xx")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.appspot.com",
+                Collections.singletonList(SubjectName.DNS("*.appspot.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "demo-s3-bucket.s3.eu-central-1.amazonaws.com",
+                Collections.singletonList(SubjectName.DNS("*.s3.eu-central-1.amazonaws.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "hostname-workspace-1.ops.domain.local",
+                Collections.singletonList(SubjectName.DNS("hostname-workspace-1.ops.domain.local")),
 
 Review comment:
   @michael-o Sure. That I can do.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] michael-o commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier
URL: https://github.com/apache/httpcomponents-client/pull/203#discussion_r370992772
 
 

 ##########
 File path: httpclient/src/test/java/org/apache/http/conn/ssl/TestDefaultHostnameVerifier.java
 ##########
 @@ -417,4 +419,28 @@ public void testExtractCN() throws Exception {
         }
     }
 
+    @Test
+    public void testMatchDNSName() throws Exception {
+        DefaultHostnameVerifier.matchDNSName(
+                "host.domain.com",
+                Collections.singletonList(SubjectName.DNS("*.domain.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.xx",
+                Collections.singletonList(SubjectName.DNS("*.xx")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.appspot.com",
+                Collections.singletonList(SubjectName.DNS("*.appspot.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "demo-s3-bucket.s3.eu-central-1.amazonaws.com",
+                Collections.singletonList(SubjectName.DNS("*.s3.eu-central-1.amazonaws.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "hostname-workspace-1.ops.domain.local",
+                Collections.singletonList(SubjectName.DNS("hostname-workspace-1.ops.domain.local")),
 
 Review comment:
   I agree that the matching logic should work, but I don't think we should use something forbidden in our tests. `hostname-workspace-1.ops.local` should do, shouldn't it for the tests?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c merged pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier

Posted by GitBox <gi...@apache.org>.
ok2c merged pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier
URL: https://github.com/apache/httpcomponents-client/pull/203
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier

Posted by GitBox <gi...@apache.org>.
ok2c commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier
URL: https://github.com/apache/httpcomponents-client/pull/203#discussion_r370990779
 
 

 ##########
 File path: httpclient/src/test/java/org/apache/http/conn/ssl/TestDefaultHostnameVerifier.java
 ##########
 @@ -417,4 +419,28 @@ public void testExtractCN() throws Exception {
         }
     }
 
+    @Test
+    public void testMatchDNSName() throws Exception {
+        DefaultHostnameVerifier.matchDNSName(
+                "host.domain.com",
+                Collections.singletonList(SubjectName.DNS("*.domain.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.xx",
+                Collections.singletonList(SubjectName.DNS("*.xx")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.appspot.com",
+                Collections.singletonList(SubjectName.DNS("*.appspot.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "demo-s3-bucket.s3.eu-central-1.amazonaws.com",
+                Collections.singletonList(SubjectName.DNS("*.s3.eu-central-1.amazonaws.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "hostname-workspace-1.ops.domain.local",
+                Collections.singletonList(SubjectName.DNS("hostname-workspace-1.ops.domain.local")),
 
 Review comment:
   @michael-o I am not sure I understand your objection. The domain name in question might well be invalid but the matching logic should still work, should not it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] michael-o commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier
URL: https://github.com/apache/httpcomponents-client/pull/203#discussion_r370960205
 
 

 ##########
 File path: httpclient/src/test/java/org/apache/http/conn/ssl/TestDefaultHostnameVerifier.java
 ##########
 @@ -417,4 +419,28 @@ public void testExtractCN() throws Exception {
         }
     }
 
+    @Test
+    public void testMatchDNSName() throws Exception {
+        DefaultHostnameVerifier.matchDNSName(
+                "host.domain.com",
+                Collections.singletonList(SubjectName.DNS("*.domain.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.xx",
+                Collections.singletonList(SubjectName.DNS("*.xx")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.appspot.com",
+                Collections.singletonList(SubjectName.DNS("*.appspot.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "demo-s3-bucket.s3.eu-central-1.amazonaws.com",
+                Collections.singletonList(SubjectName.DNS("*.s3.eu-central-1.amazonaws.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "hostname-workspace-1.ops.domain.local",
+                Collections.singletonList(SubjectName.DNS("hostname-workspace-1.ops.domain.local")),
 
 Review comment:
   Call me stupid, but [this](https://publicsuffix.org/list/public_suffix_list.dat) list does not include the `.local` domain and according to [RFC 6762, section 3](https://tools.ietf.org/html/rfc6762#section-3) this hostname is invalid. only a single DNS label is allowed in the `.local` domain.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] michael-o commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier
URL: https://github.com/apache/httpcomponents-client/pull/203#discussion_r370992772
 
 

 ##########
 File path: httpclient/src/test/java/org/apache/http/conn/ssl/TestDefaultHostnameVerifier.java
 ##########
 @@ -417,4 +419,28 @@ public void testExtractCN() throws Exception {
         }
     }
 
+    @Test
+    public void testMatchDNSName() throws Exception {
+        DefaultHostnameVerifier.matchDNSName(
+                "host.domain.com",
+                Collections.singletonList(SubjectName.DNS("*.domain.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.xx",
+                Collections.singletonList(SubjectName.DNS("*.xx")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "host.appspot.com",
+                Collections.singletonList(SubjectName.DNS("*.appspot.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "demo-s3-bucket.s3.eu-central-1.amazonaws.com",
+                Collections.singletonList(SubjectName.DNS("*.s3.eu-central-1.amazonaws.com")),
+                publicSuffixMatcher);
+        DefaultHostnameVerifier.matchDNSName(
+                "hostname-workspace-1.ops.domain.local",
+                Collections.singletonList(SubjectName.DNS("hostname-workspace-1.ops.domain.local")),
 
 Review comment:
   I agree that the matching logic should work, but I don't think we should use something forbidden in our tests. `hostname-workspace-1-ops.local` should do, shouldn't it for the tests?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] l3ender commented on issue #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier

Posted by GitBox <gi...@apache.org>.
l3ender commented on issue #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier
URL: https://github.com/apache/httpcomponents-client/pull/203#issuecomment-592081303
 
 
   I see this is targeted for 4.5.12--is there a release in process for that version yet? If there is anything I can do to help please let me know.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on issue #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier

Posted by GitBox <gi...@apache.org>.
ok2c commented on issue #203: HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier
URL: https://github.com/apache/httpcomponents-client/pull/203#issuecomment-592657114
 
 
   @l3ender I will try to get around to next week.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org