Package net.sf.json.util
Class WebHijackPreventionStrategy
- java.lang.Object
-
- net.sf.json.util.WebHijackPreventionStrategy
-
- Direct Known Subclasses:
WebHijackPreventionStrategy.CommentWebHijackPreventionStrategy
,WebHijackPreventionStrategy.InfiniteLoopWebHijackPreventionStrategy
public abstract class WebHijackPreventionStrategy extends java.lang.Object
Defines base implementations for preventing WebHijack in AJAX applications. The default implementations are:- COMMENTS - wraps the string with /* *\/
- INFINITE_LOOP - prepends "while(1);"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
WebHijackPreventionStrategy.CommentWebHijackPreventionStrategy
private static class
WebHijackPreventionStrategy.InfiniteLoopWebHijackPreventionStrategy
-
Field Summary
Fields Modifier and Type Field Description static WebHijackPreventionStrategy
COMMENTS
Wraps the string with /* *\/static WebHijackPreventionStrategy
INFINITE_LOOP
Prepends "while(1);"
-
Constructor Summary
Constructors Constructor Description WebHijackPreventionStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.lang.String
protect(java.lang.String str)
Transforms the input with the desired strategy.
-
-
-
Field Detail
-
COMMENTS
public static final WebHijackPreventionStrategy COMMENTS
Wraps the string with /* *\/
-
INFINITE_LOOP
public static final WebHijackPreventionStrategy INFINITE_LOOP
Prepends "while(1);"
-
-