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.ObjectDefines 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 classWebHijackPreventionStrategy.CommentWebHijackPreventionStrategyprivate static classWebHijackPreventionStrategy.InfiniteLoopWebHijackPreventionStrategy
-
Field Summary
Fields Modifier and Type Field Description static WebHijackPreventionStrategyCOMMENTSWraps the string with /* *\/static WebHijackPreventionStrategyINFINITE_LOOPPrepends "while(1);"
-
Constructor Summary
Constructors Constructor Description WebHijackPreventionStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.lang.Stringprotect(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);"
-
-