#1
|
||||
|
||||
myFilePath Security Error
Hallö,
bisher habe ich immer per Knopfdruck aus der Downloadliste die fehlenden Ordner erstellen lassen. Leider funktioniert das seit dem letzten Update nicht mehr: Code:
var packageDownloadFolder = myFilePackage.getDownloadFolder(); var myFilePath = getPath(packageDownloadFolder); if (!myFilePath.exists()) { if (myFilePath.mkdirs()) { t += " (Folder created)\r\n"; } else { t += " (create folder Error)\r\n"; } } else { t += " (Folder exists)\r\n"; } |
#2
|
|||
|
|||
[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"); } 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) |
#3
|
||||
|
||||
will be fixed with next update
__________________
JD-Dev & Server-Admin |
#4
|
|||
|
|||
I can confirm that I am no longer receiving the error message and script is functioning as before.
Build Date: Tue 30 03:05:07 CEST 2016 Core: #34784 Thank you very much. |
#5
|
||||
|
||||
Thanks for the feedback!
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|