[ https://issues.apache.org/jira/browse/FTPSERVER-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sai Pullabhotla updated FTPSERVER-227: -------------------------------------- Attachment: FTPSERVER-227_patch.text Attached is the patch for this issue. This patch is set to send a 550 reply code when the client attempts to delete the current working directory. Feel free to change it to 450 if you think that is more appropriate. I found another bug related to the 450 reply in the RMD command for which I left a TODO with description. I added a new method in the NativeFtpFile to check if two NativeFtpFile objects are same. Right now, it checks to see if the java.io.File objects are equal. I hope that is good enough. Updated the RmDir test case. Please note that this fix stops one from deleting the working directory from one's own session. In other words, session 2 would be able to delete the working directory of session 1. This is what most FTP servers do too. > RMD command should not delete the current working directory or the any parent > of current working directory > ---------------------------------------------------------------------------------------------------------- > > Key: FTPSERVER-227 > URL: https://issues.apache.org/jira/browse/FTPSERVER-227 > Project: FtpServer > Issue Type: Bug > Components: Core > Affects Versions: 1.0.0-M4 > Reporter: Sai Pullabhotla > Fix For: 1.0.0-RC1 > > Attachments: FTPSERVER-227_patch.text > > > RMD command should not delete the current working directory or the any parent > of current working directory. > case 1: Let us say, the current working directory is "/wd" then "RMD ." or > RMD "/wd" should result in a 5XX reply. > case 2: Let us say the working directory is "/wd/subdir", then RMD /wd or > "RMD .." should also be restricted and a 5xx reply should be sent. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.