Changing PWD in a Builder [message #1690956] |
Wed, 01 April 2015 09:45 |
Kaz Nishimura Messages: 89 Registered: December 2014 |
Member |
|
|
I am now planning to implement a feature in a Builder plugin to change the working directory to a subdirectory of the workspace before launching a command. Does Launcher.ProcStarter.pwd allow going out of the workspace by using ".." or an absolute path?
If so, I must implement some protection measure not to go out of the workspace by malicious job configurations. Is there any method in Hudson that I can use to check a path is inside the workspace?
Kaz Nishimura
[Updated on: Wed, 01 April 2015 09:46] Report message to a moderator
|
|
|
|
Re: Changing PWD in a Builder [message #1691675 is a reply to message #1691014] |
Thu, 09 April 2015 01:26 |
Kaz Nishimura Messages: 89 Registered: December 2014 |
Member |
|
|
If so, is there any answer to the second question? I would like only to allow chdir into a subdirectory of the workspace. Since FilePath may represent remote path, absolute path checking is not so easy IMO, especially on Windows nodes.
Kaz Nishimura
|
|
|
Powered by
FUDForum. Page generated in 0.03913 seconds