Package net.sf.json.util
Class WebHijackPreventionStrategy
java.lang.Object
net.sf.json.util.WebHijackPreventionStrategy
- Direct Known Subclasses:
WebHijackPreventionStrategy.CommentWebHijackPreventionStrategy
,WebHijackPreventionStrategy.InfiniteLoopWebHijackPreventionStrategy
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 ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WebHijackPreventionStrategy
Wraps the string with /* *\/static final WebHijackPreventionStrategy
Prepends "while(1);" -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
COMMENTS
Wraps the string with /* *\/ -
INFINITE_LOOP
Prepends "while(1);"
-
-
Constructor Details
-
WebHijackPreventionStrategy
public WebHijackPreventionStrategy()
-
-
Method Details
-
protect
Transforms the input with the desired strategy.- Parameters:
str
- a json string- Returns:
- String - the transformed json string
-