4

I uploaded malware file into benign container by mistake, and I'm trying it.

I'm trying to remove file from 'Malware_Files' container. I know it's there because of the 'get' command, but the 'delete' command wouldn't work.

I'm performing this code:

ObjectStorageService objectStorageService = 
    ObjectStorage.authenticateAndGetObjectStorageService();
    String container = "Malware_Files";
    String fileName = "710cca9062403470a68a9280538a237ec33dc773e9682e1b75b28ed6cb441b27";
    SwiftObject fileObj = objectStorageService.objects().get(container,fileName);
    System.out.println("Got File!" + fileObj.getName() + " at size " + fileObj.getSizeInBytes());
    ActionResponse response = objectStorageService.objects().delete(container, fileObj.getName());
    System.out.println("Response: " + response);
    SwiftObject fileObjAGAIN = objectStorageService.objects().get(container,fileName);
    System.out.println("Got File!" + fileObjAGAIN.getName() + " at size " + 
    fileObjAGAIN.getSizeInBytes());

Which should get the object wanted, delete it, and then get it again and to see that it's not there anymore.

But this is my output:

Got File! 710cca9062403470a68a9280538a237ec33dc773e9682e1b75b28ed6cb441b27 
at size 786432
Response: ActionResponse{success=false, fault=Not Found, code=404}
Got File! 710cca9062403470a68a9280538a237ec33dc773e9682e1b75b28ed6cb441b27 at size 786432

In addition: I tried to delete another file that I'm sure that exists (I've seen it in the GUI) and it works. So I guess it's some kind of bug. I opened this ticket.

Do someone know if it's truly a bug? Or can it be solved in another way?

halfer
  • 19,824
  • 17
  • 99
  • 186
jonb
  • 845
  • 1
  • 13
  • 36
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Mar 28 '18 at 13:20
  • Ok, thanks for the clarification – jonb Mar 28 '18 at 13:52

0 Answers0