/** * Returns the security settings for the given script * type, script url and document url * * @param scriptType type of script, as found in the * type attribute of the <script> element. * @param scriptURL url for the script, as defined in * the script's xlink:href attribute. If that * attribute was empty, then this parameter should * be null * @param docURL url for the document into which the * script was found. */ public ScriptSecurity getScriptSecurity(String scriptType, ParsedURL scriptURL, ParsedURL docURL){ return new RelaxedScriptSecurity(scriptType, scriptURL, docURL); /* return new DefaultScriptSecurity(scriptType, scriptURL, docURL); return new EmbededScriptSecurity(scriptType, scriptURL, docURL); return new NoLoadScriptSecurity(scriptType); */ }
/** * Returns the security settings for the given script * type, script url and document url * * @param scriptType type of script, as found in the * type attribute of the <script> element. * @param scriptURL url for the script, as defined in * the script's xlink:href attribute. If that * attribute was empty, then this parameter should * be null * @param docURL url for the document into which the * script was found. */ public ScriptSecurity getScriptSecurity(String scriptType, ParsedURL scriptURL, ParsedURL docURL){ return new RelaxedScriptSecurity(scriptType, scriptURL, docURL); /* return new DefaultScriptSecurity(scriptType, scriptURL, docURL); return new EmbededScriptSecurity(scriptType, scriptURL, docURL); return new NoLoadScriptSecurity(scriptType); */ }
/** * Returns the security settings for the given script * type, script url and document url * * @param scriptType type of script, as found in the * type attribute of the <script> element. * @param scriptURL url for the script, as defined in * the script's xlink:href attribute. If that * attribute was empty, then this parameter should * be null * @param docURL url for the document into which the * script was found. */ public ScriptSecurity getScriptSecurity(String scriptType, ParsedURL scriptURL, ParsedURL docURL){ return new RelaxedScriptSecurity(scriptType, scriptURL, docURL); /* return new DefaultScriptSecurity(scriptType, scriptURL, docURL); return new EmbededScriptSecurity(scriptType, scriptURL, docURL); return new NoLoadScriptSecurity(scriptType); */ }
public ScriptSecurity getScriptSecurity(String scriptType, ParsedURL scriptURL, ParsedURL docURL) { ScriptSecurity result = null; if (scripts.indexOf(scriptType) == -1) { result = new NoLoadScriptSecurity(scriptType); } else { if ("ANY".equals(scriptOrigin)) { result = new RelaxedScriptSecurity(scriptType, scriptURL, docURL); } else if ("DOCUMENT".equals(scriptOrigin)) { result = new DefaultScriptSecurity(scriptType, scriptURL, docURL); } else if ("EMBEDED".equals(scriptOrigin)) { result = new EmbededScriptSecurity(scriptType, scriptURL, docURL); } else { result = new NoLoadScriptSecurity(scriptType); } } return result; }
(scriptType,scriptPURL,docPURL); } else { return new RelaxedScriptSecurity (scriptType,scriptPURL,docPURL);
(scriptType,scriptPURL,docPURL); } else { return new RelaxedScriptSecurity (scriptType,scriptPURL,docPURL);
switch(application.getAllowedScriptOrigin()) { case ResourceOrigin.ANY: return new RelaxedScriptSecurity(scriptType, scriptURL, docURL);
switch(application.getAllowedScriptOrigin()) { case ResourceOrigin.ANY: return new RelaxedScriptSecurity(scriptType, scriptURL, docURL);