Thread: [Solved] myFilePath Security Error
View Single Post
  #2  
Old 28.08.2016, 19:27
ZereoX ZereoX is offline
Modem User
 
Join Date: Aug 2016
Posts: 2
Default [Event Scripter] - getPath() Security Violation

I created a small 2 line script to move finished packages from my Downloads folder to my Completed folder, but in the past 2 days I've been getting an error message every time the script is ran (Script was running without issues for over a year).

Script:
Code:
if (package.isFinished() == true) {
    getPath(package.getDownloadFolder()).moveTo("/home/zereox/Downloads/Completed");
}
Error:
Code:
net.sourceforge.htmlunit.corejs.javascript.EcmaError: Security Violation: Security Violation org.jdownloader.extensions.eventscripter.sandboxobjects.FilePathSandbox17 (#1)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at org.jdownloader.extensions.eventscripter.ScriptThread.isClassVisibleToScript(ScriptThread.java:359)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory$2.visibleToScripts(JSHtmlUnitPermissionRestricter.java:163)
	at net.sourceforge.htmlunit.corejs.javascript.JavaMembers.<init>(JavaMembers.java:31)
	at net.sourceforge.htmlunit.corejs.javascript.JavaMembers.lookupClass(JavaMembers.java:785)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaObject.initMembers(NativeJavaObject.java:53)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaObject.<init>(NativeJavaObject.java:43)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaObject.<init>(NativeJavaObject.java:34)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxNativeJavaObject.<init>(JSHtmlUnitPermissionRestricter.java:284)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxWrapFactory.wrapAsJavaObject(JSHtmlUnitPermissionRestricter.java:273)
	at net.sourceforge.htmlunit.corejs.javascript.WrapFactory.wrap(WrapFactory.java:72)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxWrapFactory.wrap(JSHtmlUnitPermissionRestricter.java:251)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:222)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at script(:1)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:120)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
	at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
	at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:212)
	at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:110)
Reply With Quote