org.apache.hc.client5.http.cookie.CookieAttributeHandler and leverages
its match method to never match a suffix from a black list. May be used to provide
additional security for cross-site attack types by preventing cookies from apparent
domains that are not publicly available.
PublicSuffixList, PublicSuffixMatcher
| Modifier and Type | Field and Description |
|---|---|
| private final CommonCookieAttributeHandler | |
| private final Map | |
| private final PublicSuffixMatcher |
| Access | Constructor and Description |
|---|---|
| public | PublicSuffixDomainFilter(final CommonCookieAttributeHandler handler, final PublicSuffixMatcher publicSuffixMatcher)
|
| public | PublicSuffixDomainFilter(final CommonCookieAttributeHandler handler, final PublicSuffixList suffixList)
|
| Modifier and Type | Method and Description |
|---|---|
| private static Map | |
| public static CommonCookieAttributeHandler | |
| public String | |
| public boolean | match(final Cookie cookie, final CookieOrigin
the cookie source to match against origin)Implements org. |
| public void | parse(final SetCookie
org. to be updatedcookie attribute value from the cookie response header value)Implements org. org. property.
|
| public void | validate(final Cookie
org. to validatethe cookie source to validate against origin)Implements org. |
| handler | back to summary |
|---|---|
| private final CommonCookieAttributeHandler handler | |
| localDomainMap | back to summary |
|---|---|
| private final Map<String, Boolean> localDomainMap | |
| publicSuffixMatcher | back to summary |
|---|---|
| private final PublicSuffixMatcher publicSuffixMatcher | |
| PublicSuffixDomainFilter | back to summary |
|---|---|
| public PublicSuffixDomainFilter(final CommonCookieAttributeHandler handler, final PublicSuffixMatcher publicSuffixMatcher) | |
| PublicSuffixDomainFilter | back to summary |
|---|---|
| public PublicSuffixDomainFilter(final CommonCookieAttributeHandler handler, final PublicSuffixList suffixList) | |
| createLocalDomainMap | back to summary |
|---|---|
| private static Map | |
| decorate | back to summary |
|---|---|
| public static CommonCookieAttributeHandler decorate(final CommonCookieAttributeHandler handler, final PublicSuffixMatcher publicSuffixMatcher) | |
| getAttributeName | back to summary |
|---|---|
| public String getAttributeName() Implements org.
| |
| match | back to summary |
|---|---|
| public boolean match(final Cookie cookie, final CookieOrigin origin) Implements org. Never matches if the cookie's domain is from the blacklist.
| |
| parse | back to summary |
|---|---|
| public void parse(final SetCookie cookie, final String value) throws MalformedCookieException Implements org. Doc from org. Parse the given cookie attribute value and processChallenge the corresponding
| |
| validate | back to summary |
|---|---|
| public void validate(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException Implements org. Doc from org. Performs cookie validation for the given attribute value.
| |