Package net.sf.json.util
Class WebHijackPreventionStrategy
java.lang.Object
net.sf.json.util.WebHijackPreventionStrategy
Defines base implementations for preventing WebHijack in AJAX applications.
The default implementations are:
- COMMENTS - wraps the string with /* *\/
- INFINITE_LOOP - prepends "while(1);"
- Author:
- Andres Almiray aalmiray@users.sourceforge.net
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WebHijackPreventionStrategyWraps the string with /* *\/static final WebHijackPreventionStrategyPrepends "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
-