> On 12. Nov 2020, at 22:40, Tal Yanai <[email protected]> wrote:
> 
> String buildDir = build.getRootDir().getAbsolutePath();
> FilePath masterDirectory = new FilePath(new File(buildDir + File.separator + 
> fileName));

As all paths here are on the master, is this the same as the following?

FilePath masterDirectory = build.getRootDir().child(fileName)

Would still not recommend storing files directly in the build dir; most plugins 
create subdirectories and store their build data there. Otherwise your files 
may collide with others; and if user controlled file names are involved, even 
without path traversal, replace build.xml etc.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/E5C82C3F-99A4-4557-BBD4-E534658AF557%40beckweb.net.

Reply via email to