Actual behaviour
When uploading a eicar file (file that is marked as a virus) the android app returns “upload failed - Snsupported Media Type”.
Expected behaviour
When uploading an infected file, the user is given a clear feedback and the applications stops from trying to upload that file again.
Steps to reproduce
- Upload a eicar file from the Android app.
- Receive feedback that does not explain the issue.
Can this problem be reproduced with the official owncloud server?
(url: https://demo.owncloud.org, user: test, password: test)
No, does not seem to have virus (ClamAV enabled)
Environment data
ownCloud app version:
2.4.0
ownCloud server version:
9.1.5
Logs
Exception: {“Message”:“HTTP/1.1 415 Virus Eicar-Test-Signature is detected in the file. Upload cannot be completed.”,“Exception”:“OCA\DAV\Connector\Sabre\Exception\UnsupportedMediaType”,“Code”:0,“Trace”:“#0 /var/www/html/owncloud/apps/dav/lib/Connector/Sabre/File.php(157): OCA\DAV\Connector\Sabre\File->convertToSabreException(Object(OCP\Files\InvalidContentException))\n#1 /var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(1070): OCA\DAV\Connector\Sabre\File->put(Resource id #712)\n#2 /var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(511): Sabre\DAV\Server->updateFile(‘virus.txt’, Resource id #712, NULL)\n#3 [internal function]: Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#4 /var/www/html/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 /var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(459): Sabre\Event\EventEmitter->emit(‘method:PUT’, Array)\n#6 /var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#7 /var/www/html/owncloud/apps/dav/appinfo/v1/webdav.php(61): Sabre\DAV\Server->exec()\n#8 /var/www/html/owncloud/remote.php(164): require_once(‘/var/www/html/o…’)\n#9 {main}”,“File”:“/var/www/html/owncloud/apps/dav/lib/Connector/Sabre/File.php”,“Line”:538,“User”:“FC8C390C-9B01-47A6-ACEA-91391133E287”}