dxbjavid commented on PR #902:
URL: 
https://github.com/apache/httpcomponents-client/pull/902#issuecomment-6625876278

   Good catch. The pattern is now normalised straight after the IDN step, 
before the empty and wildcard checks, so "*.com." is rejected the same way 
"*.com" is. Running the existing tests showed that the obvious version of this 
had a hole of its own: "*." strips down to a bare "*" and would have slipped 
past the startsWith("*.") check as an exact host, so the wildcard check now 
treats any pattern beginning with "*" as a wildcard attempt and requires the 
*.label.label shape. A side effect is that a bare "*" is rejected too, where 
before it went in as a harmless exact rule that could never match.
   
   Tests added for "*.com." and "*" being rejected, a valid pin with a 
trailing-dot host going through verifySession, trailing-dot rule patterns in 
both exact and wildcard form matched against the plain and the dotted host, and 
the single-label check for "*.example.com." against a.b.example.com and 
example.com.


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