You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Simon Wade (JIRA)" <ji...@apache.org> on 2018/10/09 03:51:00 UTC

[jira] [Commented] (IVY-1590) FileUtil.forceDelete() follows symlinks

    [ https://issues.apache.org/jira/browse/IVY-1590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16642758#comment-16642758 ] 

Simon Wade commented on IVY-1590:
---------------------------------

I am reasonably certain I can get this to break the cache (so that it requires manual intervention in order to repair) by performing consecutive retrieves with sync and symlinks enabled. The key is to _remove_ a dependency on the second retrieve, resulting in a call to forceDelete() on the artifacts that are no longer required; if these are symlinks to directories, then the cache gets cleaned out. :(

However, I'm using a modified version of Ivy that permits me to create symlinks on Windows (see IVY-1594), and I think it would be best to attempt to reproduce this on a version without such modifications.

> FileUtil.forceDelete() follows symlinks
> ---------------------------------------
>
>                 Key: IVY-1590
>                 URL: https://issues.apache.org/jira/browse/IVY-1590
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.5.0-rc1
>            Reporter: Simon Wade
>            Priority: Major
>
> If FileUtil.forceDelete(File) is called with symbolic link to a directory, it will follow that link and delete the contents of the target directory. It's not clear if this is the intended behaviour or not, but it does carry the risk of reaching into the cache via retrieved artifacts.
> Note that this was observed on Windows; the behaviour on other platforms is unknown.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)