ok2c commented on code in PR #953:
URL: 
https://github.com/apache/httpcomponents-client/pull/953#discussion_r4640704548


##########
httpclient5/src/main/java/org/apache/hc/client5/http/protocol/ResponseProcessCookies.java:
##########
@@ -140,6 +146,42 @@ private void processCookies(
         }
     }
 
+    /**
+     * RFC 6265bis, 5.7: a cookie received from an insecure origin is ignored 
if the store
+     * holds a secure cookie with the same name whose domain domain-matches 
the new cookie's
+     * domain (or vice versa) and whose path is path-matched by the new 
cookie's path.
+     */
+    private static boolean overlaysSecureCookie(final Cookie cookie, final 
CookieStore cookieStore) {

Review Comment:
   > No. RFC 6265 lets an insecure origin both set a Secure cookie and replace 
one (5.3 step 11 matches on name, domain and path only), and it calls that out 
as a known limitation in 4.1.2.5 and 8.6 (Weak Integrity). Both checks here 
only exist in 6265bis. 
[#869](https://github.com/apache/httpcomponents-client/pull/869) already has 
the same two checks as part of the broader 6265bis work, so this one overlaps 
it; fine to close it in favor of that.
   
   @Hsnmohd Yes, please close this PR in favor of #869. 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to