Hi,
I implemented some WEBDAV function in my software using the SABREDAV CLIENT
We just encountered this morning an odd bug that deleted 6Gb of data (hopefully we had a backup)
Here's the PHP code :
$response = $client->request('MOVE', '/files/user/DOSSIERS/test',null, ['Destination' => '/files/user/DOSSIERS/' . $newname]);
In this case the user didn't input $newname so the executed command was :
$response = $client->request('MOVE', '/files/user/DOSSIERS/test',null, ['Destination' => '/files/user/DOSSIERS/']);
You can think that this command returns an error.
It is in fact the case : ERROR 404
BUT !
This command deletes the whole ==DOSSIERS== folder including every subfolders and files in it !!
THIS IS VERY VERY DANGEROUS !
Is this the expected behaviour ?