Issue Type: Improvement Improvement
Assignee: Unassigned
Components: core
Created: 06/Feb/15 4:11 PM
Description:

Commonly need to verify that file paths provided by a user are really relative and do not refer to locations outside a workspace or the like. Should have something in Util along the lines of

public static boolean isInside(File root, File f) throws IOException {
    String path = f.getCanonicalPath();
    String rootPath = root.getCanonicalPath();
    return path.equals(rootPath) || path.startsWith(rootPath + File.separatorChar);
}

and a matching method in FilePath.

Project: Jenkins
Labels: api security
Priority: Minor Minor
Reporter: Jesse Glick
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to