|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.http.impl.cookie.PublicSuffixFilterHC4
public class PublicSuffixFilterHC4
Wraps a 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. An uptodate list of suffixes can be obtained from publicsuffix.org
| Constructor Summary | |
|---|---|
PublicSuffixFilterHC4(org.apache.http.cookie.CookieAttributeHandler wrapped)
|
|
| Method Summary | |
|---|---|
boolean |
match(org.apache.http.cookie.Cookie cookie,
org.apache.http.cookie.CookieOrigin origin)
Never matches if the cookie's domain is from the blacklist. |
void |
parse(org.apache.http.cookie.SetCookie cookie,
java.lang.String value)
|
void |
setExceptions(java.util.Collection<java.lang.String> exceptions)
Sets the exceptions from the blacklist. |
void |
setPublicSuffixes(java.util.Collection<java.lang.String> suffixes)
Sets the suffix blacklist patterns. |
void |
validate(org.apache.http.cookie.Cookie cookie,
org.apache.http.cookie.CookieOrigin origin)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PublicSuffixFilterHC4(org.apache.http.cookie.CookieAttributeHandler wrapped)
| Method Detail |
|---|
public void setPublicSuffixes(java.util.Collection<java.lang.String> suffixes)
suffixes - public void setExceptions(java.util.Collection<java.lang.String> exceptions)
exceptions -
public boolean match(org.apache.http.cookie.Cookie cookie,
org.apache.http.cookie.CookieOrigin origin)
match in interface org.apache.http.cookie.CookieAttributeHandler
public void parse(org.apache.http.cookie.SetCookie cookie,
java.lang.String value)
throws org.apache.http.cookie.MalformedCookieException
parse in interface org.apache.http.cookie.CookieAttributeHandlerorg.apache.http.cookie.MalformedCookieException
public void validate(org.apache.http.cookie.Cookie cookie,
org.apache.http.cookie.CookieOrigin origin)
throws org.apache.http.cookie.MalformedCookieException
validate in interface org.apache.http.cookie.CookieAttributeHandlerorg.apache.http.cookie.MalformedCookieException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||