Class WebHijackPreventionStrategy


  • 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);"
    Author:
    Andres Almiray
    • Constructor Detail

      • WebHijackPreventionStrategy

        public WebHijackPreventionStrategy()
    • Method Detail

      • protect

        public abstract java.lang.String protect​(java.lang.String str)
        Transforms the input with the desired strategy.
        Parameters:
        str - a json string
        Returns:
        String - the transformed json string