undo-ransomware / ransomware_detection

:arrows_counterclockwise: Ransomware recovery app for Nextcloud
https://apps.nextcloud.com/apps/ransomware_detection
GNU Affero General Public License v3.0
22 stars 6 forks source link

This app block Notes sync from Android Nextcloud Notes app #26

Closed yostral closed 4 years ago

yostral commented 4 years ago

Notes from Android Notes app are now partially synchronized. Until few weeks ago (v0.6.0 update?), everything worked flawlessly.

Now, I have to deactivate Ransomware Recovery to be able to use and sync my notes from my phone. But when I create a note from my desktop, with for exemple QownNote, it works normally, no sync problem.

So there is something wrong between the apps, ransomware Recovery and Android Note app.

See this issue for Notes app.

Steps to reproduce

Install this app and Notes app, Android Notes app and create a new note from your phone. Only the title (first line) is synchronized.

Expected behaviour

Title and Body should synchronize.

Actual behaviour

Only the title (first line) is synchronized.

Server configuration detail

Operating system: Linux 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64

Webserver: nginx/1.14.2 (fpm-fcgi)

Database: mysql 10.3.18

PHP version:

7.3.11-1~deb10u1 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, sodium, standard, cgi-fcgi, mysqlnd, PDO, xml, apcu, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imagick, intl, json, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 17.0.2 - 17.0.2.1

Updated from an older Nextcloud/ownCloud or fresh install: Updated from Nextcloud 16

Where did you install Nextcloud from: zip from the website

Signing status Array ( )
List of activated apps ``` Enabled: - accessibility: 1.3.0 - activity: 2.10.1 - bruteforcesettings: 1.4.0 - calendar: 1.7.1 - carnet: 0.19.1 - cloud_federation_api: 1.0.0 - comments: 1.7.0 - contacts: 3.1.6 - dav: 1.13.0 - deck: 0.7.0 - drawio: 0.9.4 - extract: 1.2.2 - federatedfilesharing: 1.7.0 - federation: 1.7.0 - files: 1.12.0 - files_downloadactivity: 1.6.0 - files_mindmap: 0.0.15 - files_pdfviewer: 1.6.0 - files_rightclick: 0.15.1 - files_sharing: 1.9.0 - files_trashbin: 1.7.0 - files_versions: 1.10.0 - files_videoplayer: 1.6.0 - firstrunwizard: 2.6.0 - flowupload: 0.1.7 - gallery: 18.4.0 - gpxpod: 4.1.0 - guests: 1.3.1 - impersonate: 1.4.0 - issuetemplate: 0.6.0 - logreader: 2.2.0 - lookup_server_connector: 1.5.0 - mail: 0.21.1 - maps: 0.1.2 - metadata: 0.10.0 - nextcloud_announcements: 1.6.0 - notes: 3.1.1 - notifications: 2.5.0 - oauth2: 1.5.0 - ocsms: 2.1.6 - password_policy: 1.7.0 - phonetrack: 0.5.11 - privacy: 1.1.0 - provisioning_api: 1.7.0 - qownnotesapi: 19.9.0 - ransomware_detection: 0.6.0 - ransomware_protection: 1.5.1 - richdocuments: 3.5.0 - serverinfo: 1.7.0 - sharebymail: 1.7.0 - sharerenamer: 2.7.3 - spreed: 7.0.2 - support: 1.0.1 - survey_client: 1.5.0 - systemtags: 1.7.0 - tasks: 0.11.3 - text: 1.1.1 - theming: 1.8.0 - twofactor_backupcodes: 1.6.0 - updatenotification: 1.7.0 - viewer: 1.2.0 - workflowengine: 1.7.0 Disabled: - admin_audit - cms_pico - encryption - files_external - ldap_write_support - recommendations - user_ldap ```
Configuration (config/config.php) ``` { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "nextcloud.yostral.me" ], "memcache.local": "\\OC\\Memcache\\APCu", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "17.0.2.1", "overwrite.cli.url": "https:\/\/nextcloud.yostral.me", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": false, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory", "app_install_overwrite": [ "ransomware_detection", "ocsms", "flowupload" ], "has_rebuilt_cache": true, "theme": "", "loglevel": 2 } ```

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption:

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0

Operating system: Archlinux, Android 10

Logs

Web server error log ``` Nothing about Nextcloud. ```
Nextcloud log ``` OCP\Lock\LockedException: "Notes/New note.txt" is locked /var/www/nextcloud/lib/private/Files/View.php - line 2050: OC\Files\View->lockPath("/yostral/fi ... t", 1, "*** sensiti ... *") /var/www/nextcloud/lib/private/Files/View.php - line 1140: OC\Files\View->lockFile("/yostral/fi ... t", 1) /var/www/nextcloud/lib/private/Files/View.php - line 994: OC\Files\View->basicOperation("fopen", "/yostral/fi ... t", [ "read"], "r") /var/www/nextcloud/lib/private/Files/Node/File.php - line 108: OC\Files\View->fopen("/yostral/fi ... t", "r") /var/www/nextcloud/apps/ransomware_detection/lib/Analyzer/EntropyAnalyzer.php - line 164: OC\Files\Node\File->fopen("r") /var/www/nextcloud/apps/ransomware_detection/lib/Analyzer/EntropyAnalyzer.php - line 105: OCA\RansomwareDetection\Analyzer\EntropyAnalyzer->calculateEntropyOfFile(OC\Files\Node\File {}) /var/www/nextcloud/apps/ransomware_detection/lib/Monitor.php - line 450: OCA\RansomwareDetection\Analyzer\EntropyAnalyzer->analyze(OC\Files\Node\File {}) /var/www/nextcloud/apps/ransomware_detection/lib/Monitor.php - line 207: OCA\RansomwareDetection\Monitor->addFileOperation([ "files/Notes/New note.txt"], OC\Files\Node\File {}, 3) /var/www/nextcloud/apps/ransomware_detection/lib/StorageWrapper.php - line 257: OCA\RansomwareDetection\Monitor->analyze(OCA\Ransomwa ... l}, [ "files/Notes/New note.txt"], 3) /var/www/nextcloud/apps/ransomware_detection/lib/StorageWrapper.php - line 98: OCA\RansomwareDetection\StorageWrapper->analyze(OCA\Ransomwa ... l}, [ "files/Notes/New note.txt"], 3) /var/www/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php - line 252: OCA\RansomwareDetection\StorageWrapper->file_put_contents("files/Notes/New note.txt", "*** sensiti ... *") /var/www/nextcloud/lib/private/Files/View.php - line 1158: OCA\RansomwareProtection\StorageWrapper->file_put_contents("files/Notes/New note.txt", "*** sensiti ... *") /var/www/nextcloud/lib/private/Files/View.php - line 694: OC\Files\View->basicOperation("file_put_contents", "/yostral/fi ... t", [ "update","write"], "*** sensiti ... *") /var/www/nextcloud/lib/private/Files/Node/File.php - line 66: OC\Files\View->file_put_contents("/yostral/fi ... t", "*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Service/NotesService.php - line 176: OC\Files\Node\File->putContent("*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 177: OCA\Notes\Service\NotesService->update("*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 158: OCA\Notes\Controller\NotesApiController->updateData("*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Controller/Errors.php - line 22: OCA\Notes\Controller\NotesApiController->OCA\Notes\Controller\{closure}("*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 159: OCA\Notes\Controller\NotesApiController->respond(Closure {}) /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170: OCA\Notes\Controller\NotesApiController->update("*** sensiti ... *") /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99: OC\AppFramework\Http\Dispatcher->executeController(OCA\Notes\Co ... {}, "update") /var/www/nextcloud/lib/private/AppFramework/App.php - line 126: OC\AppFramework\Http\Dispatcher->dispatch(OCA\Notes\Co ... {}, "update") /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App::main("OCA\\Notes\ ... r", "update", OC\AppFramew ... {}, { id: "10475 ... "}) <> OC\AppFramework\Routing\RouteActionHandler->__invoke({ id: "10475 ... "}) /var/www/nextcloud/lib/private/Route/Router.php - line 297: call_user_func(OC\AppFramew ... {}, { id: "10475 ... "}) /var/www/nextcloud/lib/base.php - line 997: OC\Route\Router->match("/apps/notes ... 9") /var/www/nextcloud/index.php - line 42: OC::handleRequest() Enveloppé parOCP\Lock\LockedException: "files/6ce39ad3ab1c7d2226bbf076d2828d37" is locked /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 743: OC\Lock\DBLockingProvider->acquireLock("files/6ce39 ... 7", 1) /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593: OC\Files\Storage\Common->acquireLock("files/Notes/New note.txt", 1, OC\Lock\DBLockingProvider {}) /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593: OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Notes/New note.txt", 1, OC\Lock\DBLockingProvider {}) /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593: OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Notes/New note.txt", 1, OC\Lock\DBLockingProvider {}) /var/www/nextcloud/lib/private/Files/View.php - line 1940: OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Notes/New note.txt", 1, OC\Lock\DBLockingProvider {}) /var/www/nextcloud/lib/private/Files/View.php - line 2050: OC\Files\View->lockPath("/yostral/fi ... t", 1, "*** sensiti ... *") /var/www/nextcloud/lib/private/Files/View.php - line 1140: OC\Files\View->lockFile("/yostral/fi ... t", 1) /var/www/nextcloud/lib/private/Files/View.php - line 994: OC\Files\View->basicOperation("fopen", "/yostral/fi ... t", [ "read"], "r") /var/www/nextcloud/lib/private/Files/Node/File.php - line 108: OC\Files\View->fopen("/yostral/fi ... t", "r") /var/www/nextcloud/apps/ransomware_detection/lib/Analyzer/EntropyAnalyzer.php - line 164: OC\Files\Node\File->fopen("r") /var/www/nextcloud/apps/ransomware_detection/lib/Analyzer/EntropyAnalyzer.php - line 105: OCA\RansomwareDetection\Analyzer\EntropyAnalyzer->calculateEntropyOfFile(OC\Files\Node\File {}) /var/www/nextcloud/apps/ransomware_detection/lib/Monitor.php - line 450: OCA\RansomwareDetection\Analyzer\EntropyAnalyzer->analyze(OC\Files\Node\File {}) /var/www/nextcloud/apps/ransomware_detection/lib/Monitor.php - line 207: OCA\RansomwareDetection\Monitor->addFileOperation([ "files/Notes/New note.txt"], OC\Files\Node\File {}, 3) /var/www/nextcloud/apps/ransomware_detection/lib/StorageWrapper.php - line 257: OCA\RansomwareDetection\Monitor->analyze(OCA\Ransomwa ... l}, [ "files/Notes/New note.txt"], 3) /var/www/nextcloud/apps/ransomware_detection/lib/StorageWrapper.php - line 98: OCA\RansomwareDetection\StorageWrapper->analyze(OCA\Ransomwa ... l}, [ "files/Notes/New note.txt"], 3) /var/www/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php - line 252: OCA\RansomwareDetection\StorageWrapper->file_put_contents("files/Notes/New note.txt", "*** sensiti ... *") /var/www/nextcloud/lib/private/Files/View.php - line 1158: OCA\RansomwareProtection\StorageWrapper->file_put_contents("files/Notes/New note.txt", "*** sensiti ... *") /var/www/nextcloud/lib/private/Files/View.php - line 694: OC\Files\View->basicOperation("file_put_contents", "/yostral/fi ... t", [ "update","write"], "*** sensiti ... *") /var/www/nextcloud/lib/private/Files/Node/File.php - line 66: OC\Files\View->file_put_contents("/yostral/fi ... t", "*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Service/NotesService.php - line 176: OC\Files\Node\File->putContent("*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 177: OCA\Notes\Service\NotesService->update("*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 158: OCA\Notes\Controller\NotesApiController->updateData("*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Controller/Errors.php - line 22: OCA\Notes\Controller\NotesApiController->OCA\Notes\Controller\{closure}("*** sensiti ... *") /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 159: OCA\Notes\Controller\NotesApiController->respond(Closure {}) /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170: OCA\Notes\Controller\NotesApiController->update("*** sensiti ... *") /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99: OC\AppFramework\Http\Dispatcher->executeController(OCA\Notes\Co ... {}, "update") /var/www/nextcloud/lib/private/AppFramework/App.php - line 126: OC\AppFramework\Http\Dispatcher->dispatch(OCA\Notes\Co ... {}, "update") /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App::main("OCA\\Notes\ ... r", "update", OC\AppFramew ... {}, { id: "10475 ... "}) <> OC\AppFramework\Routing\RouteActionHandler->__invoke({ id: "10475 ... "}) /var/www/nextcloud/lib/private/Route/Router.php - line 297: call_user_func(OC\AppFramew ... {}, { id: "10475 ... "}) /var/www/nextcloud/lib/base.php - line 997: OC\Route\Router->match("/apps/notes ... 9") /var/www/nextcloud/index.php - line 42: OC::handleRequest() ```
Browser log Nothing about Nextcloud.
yostral commented 4 years ago

As mentioned, sync works with Qownnote, but it works too when I create a new note (text file) from a text editor (gedit for example) and save it to my local notes folder which is synced with my nextcloud.

maste9 commented 4 years ago

I can confirm that the sync of the Nextcloud Notes App is blocked until I deactivated ransomware detection on Nextcloud16.0.7 (php 7.3) with Notes3.1.1 and Ransomware Recovery 0.5.2.

nonplusnl commented 4 years ago

Confirmed for Nextcloud 18, Recovery 0.6.0, Notes 3.1.4 as well. Disabling Ransomware recovery resolves the issue

stefan-niedermann commented 4 years ago

Maybe this can help: https://github.com/stefan-niedermann/nextcloud-notes/issues/725#issuecomment-584251451

stefan-niedermann commented 4 years ago

@ilovemilk can you please give us an update about the current state of this issue?

Many users are complaining to me as the maintainer of Notes for android. If you need any information, i would be happy to provide it to you.

ilovemilk commented 4 years ago

Hi Stefan,

sorry for the late answer I am very busy lately and don't have enough time to answer directly. I will try to look into this issue at the weekend and will get back to you afterwards or if I need more information.

Nevertheless, it seems that there is a problem with locking and unlocking of files for reading/writing. Maybe the locking/unlocking of the Notes Android app is interfering with locking/unlocking of the ransomware application. Do you have any influence on the locking of files?

Best regards Matthias

stefan-niedermann commented 4 years ago

No, we aren't directly (un)locking any files.

The android app only uses the REST-API of the Notes app.

It worked well until (including) version 1.0.1 of the android app which directly did the HTTP request.

Since version 2.0.0 we use the Android Single Sign On of the main Nextcloud Android app. Technically the Notes android app uses the main android app as a proxy to do the (authenticated) requests.

Since this has been implemented, the problems with Ransomware Detection began.

Interestingly many users reported that something happens though (title, lastModified and other json properties arrived the server while some others didn't). Very strange...

ilovemilk commented 4 years ago

Okay, I took a deeper look at your attached log file. There is definitly a problem with the locking and unlocking of the files which are synchronized.

The interesting part is to find out what changed with the HTTP requests between 1.0.1 and 2.0.0 which leads to the locking/unlocking problems.

Interestingly many users reported that something happens though (title, lastModified and other json properties arrived the server while some others didn't). Very strange... Are not all information synced at once? Are they partially once by once? This could mean that we have sometimes deadlocks and sometimes not.

stefan-niedermann commented 4 years ago

Each request contains a json object with many properties.

You can get Notes for free on F-Droid if you need it for testing.

yeupou commented 4 years ago

Same here, current stable and up to date apps, it worked once again as soon as Ransomware Recovery was set off.

noci2012 commented 4 years ago

Same for me. With ransomware protection/recovery disabled syncing works. This issue also has a stack trace: https://github.com/nextcloud/notes/issues/468

ilovemilk commented 4 years ago

Thanks for the additional information. I could reproduce the problem at the weekend and the problem is definitly the locking. If I change the locking of the files everything works fine with the syncing of the notes apps but the editing of files via the web browser fails.

I have no clue how to change the locking of files to get it working properly yet. Hopefully I have enough time this evening to digg deeper.

ilovemilk commented 4 years ago

Soo after two days of research I found the reason: For analysing the data the apps reads the data via fopen and fread therefore a SHARED lock on the file is created and afterwards unlocked. The Notes app tries to move this file which has a SHARED lock and fails. Sadly, I wasn't able to find a fix for this problem I will continue the search!

korelstar commented 4 years ago

Would it help if the notes app gathers its own file lock - at first, before doing any file operations?

ilovemilk commented 4 years ago

This could maybe help but I'm not sure. It's a problem regarding both apps. It's not something I can fix only in the ransomware application. Therefore I'm now debugging both Apps to find a way to handle the locking correctly.

ilovemilk commented 4 years ago

I found some time the last days debugging notes and ransomware recovery but sadly no progress.

@korelstar Can you give me some information how I could try your approach? Where do I have to perform the locking in the notes app?

korelstar commented 4 years ago

For testing purposes it should be sufficient to add the locking into the method OCA\Notes\Controller::updateData(), i.e. add lock for file with file ID $id at the beginning and remove lock for that file at the end of that method. With this, every update operation from the Android app will be surrounded by explicit locking.

ilovemilk commented 4 years ago

Thanks for the hint I'm trying this tomorrow and report back! :)

ilovemilk commented 4 years ago

This sadly moves the problem to the notes app. Now the notes throws the locking exception. I try to use post file system hooks to move the analysis after the write/update/delete process.

ilovemilk commented 4 years ago

The post file system hooks resolves the problem but I have to refactor more on the whole app will try to release a new version at the end of the week.

yostral commented 4 years ago

Thank a lot for your work and for the 0.7 update.

But unfortunately the problem still exists :( .

Here are the logs in Nextcloud :

 [index] Error: OCP\Lock\LockedException: "Notes/Test.txt" is locked

 0. /var/www/nextcloud/lib/private/Files/View.php line 2054
    OC\Files\View->lockPath("/yostral/files/Notes/Test.txt", 1, "*** sensitive parameter replaced ***")
 1. /var/www/nextcloud/lib/private/Files/View.php line 1142
    OC\Files\View->lockFile("/yostral/files/Notes/Test.txt", 1)
 2. /var/www/nextcloud/lib/private/Files/View.php line 996
    OC\Files\View->basicOperation("fopen", "/yostral/files/Notes/Test.txt", ["read"], "r")
 3. /var/www/nextcloud/lib/private/Files/Node/File.php line 114
    OC\Files\View->fopen("/yostral/files/Notes/Test.txt", "r")
 4. /var/www/nextcloud/apps/ransomware_detection/lib/Analyzer/EntropyAnalyzer.php line 164
    OC\Files\Node\File->fopen("r")
 5. /var/www/nextcloud/apps/ransomware_detection/lib/Analyzer/EntropyAnalyzer.php line 105
    OCA\RansomwareDetection\Analyzer\EntropyAnalyzer->calculateEntropyOfFile(OC\Files\Node\File {})
 6. /var/www/nextcloud/apps/ransomware_detection/lib/Monitor.php line 450
    OCA\RansomwareDetection\Analyzer\EntropyAnalyzer->analyze(OC\Files\Node\File {})
 7. /var/www/nextcloud/apps/ransomware_detection/lib/Monitor.php line 207
    OCA\RansomwareDetection\Monitor->addFileOperation(["files/Notes/Test.txt"], OC\Files\Node\File {}, 3)
 8. /var/www/nextcloud/apps/ransomware_detection/lib/StorageWrapper.php line 257
    OCA\RansomwareDetection\Monitor->analyze(OCA\RansomwareDe ... l}, ["files/Notes/Test.txt"], 3)
 9. /var/www/nextcloud/apps/ransomware_detection/lib/StorageWrapper.php line 98
    OCA\RansomwareDetection\StorageWrapper->analyze(OCA\RansomwareDe ... l}, ["files/Notes/Test.txt"], 3)
10. /var/www/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php line 252
    OCA\RansomwareDetection\StorageWrapper->file_put_contents("files/Notes/Test.txt", "*** sensitive parameter replaced ***")
11. /var/www/nextcloud/lib/private/Files/View.php line 1160
    OCA\RansomwareProtection\StorageWrapper->file_put_contents("files/Notes/Test.txt", "*** sensitive parameter replaced ***")
12. /var/www/nextcloud/lib/private/Files/View.php line 694
    OC\Files\View->basicOperation("file_put_contents", "/yostral/files/Notes/Test.txt", ["update","write"], "*** sensitive parameter replaced ***")
13. /var/www/nextcloud/lib/private/Files/Node/File.php line 71
    OC\Files\View->file_put_contents("/yostral/files/Notes/Test.txt", "*** sensitive parameter replaced ***")
14. /var/www/nextcloud/apps/notes/lib/Service/NotesService.php line 184
    OC\Files\Node\File->putContent("*** sensitive parameter replaced ***")
15. /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php line 194
    OCA\Notes\Service\NotesService->update("*** sensitive parameters replaced ***")
16. /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php line 170
    OCA\Notes\Controller\NotesApiController->updateData("*** sensitive parameters replaced ***")
17. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Notes\Controller\NotesApiController->update("*** sensitive parameters replaced ***")
18. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Notes\Contro ... {}, "update")
19. /var/www/nextcloud/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Notes\Contro ... {}, "update")
20. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Notes\\Con ... r", "update", OC\AppFramework\ ... {}, {id: "248775",_r ... "})
21. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({id: "248775",_r ... "})
22. /var/www/nextcloud/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {id: "248775",_r ... "})
23. /var/www/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/notes/api/v0.2/notes/248775")
24. /var/www/nextcloud/index.php line 38
    OC::handleRequest()

Causé parOCP\Lock\LockedException: "files/3a8520c7b5bd1e1991f10ef23588de70" is locked

0.  /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 747:
    OC\Lock\DBLockingProvider->acquireLock("files/3a852 ... 0", 1)

1.  /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593:
    OC\Files\Storage\Common->acquireLock("files/Notes/Test.txt", 1, OC\Lock\DBLockingProvider {})

2.  /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593:
    OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Notes/Test.txt", 1, OC\Lock\DBLockingProvider {})

3.  /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593:
    OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Notes/Test.txt", 1, OC\Lock\DBLockingProvider {})

4.  /var/www/nextcloud/lib/private/Files/View.php - line 1942:
    OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Notes/Test.txt", 1, OC\Lock\DBLockingProvider {})

5.  /var/www/nextcloud/lib/private/Files/View.php - line 2054:
    OC\Files\View->lockPath("/yostral/files/Notes/Test.txt", 1, "*** sensiti ... *")

6.  /var/www/nextcloud/lib/private/Files/View.php - line 1142:
    OC\Files\View->lockFile("/yostral/files/Notes/Test.txt", 1)

7.  /var/www/nextcloud/lib/private/Files/View.php - line 996:
    OC\Files\View->basicOperation("fopen", "/yostral/files/Notes/Test.txt", [ "read"], "r")

8.  /var/www/nextcloud/lib/private/Files/Node/File.php - line 114:
    OC\Files\View->fopen("/yostral/files/Notes/Test.txt", "r")

9.  /var/www/nextcloud/apps/ransomware_detection/lib/Analyzer/EntropyAnalyzer.php - line 164:
    OC\Files\Node\File->fopen("r")

10.  /var/www/nextcloud/apps/ransomware_detection/lib/Analyzer/EntropyAnalyzer.php - line 105:
    OCA\RansomwareDetection\Analyzer\EntropyAnalyzer->calculateEntropyOfFile(OC\Files\Node\File {})

11.  /var/www/nextcloud/apps/ransomware_detection/lib/Monitor.php - line 450:
    OCA\RansomwareDetection\Analyzer\EntropyAnalyzer->analyze(OC\Files\Node\File {})

12.  /var/www/nextcloud/apps/ransomware_detection/lib/Monitor.php - line 207:
    OCA\RansomwareDetection\Monitor->addFileOperation([ "files/Notes/Test.txt"], OC\Files\Node\File {}, 3)

13.  /var/www/nextcloud/apps/ransomware_detection/lib/StorageWrapper.php - line 257:
    OCA\RansomwareDetection\Monitor->analyze(OCA\Ransomwa ... l}, [ "files/Notes/Test.txt"], 3)

14.  /var/www/nextcloud/apps/ransomware_detection/lib/StorageWrapper.php - line 98:
    OCA\RansomwareDetection\StorageWrapper->analyze(OCA\Ransomwa ... l}, [ "files/Notes/Test.txt"], 3)

15.  /var/www/nextcloud/apps/ransomware_protection/lib/StorageWrapper.php - line 252:
    OCA\RansomwareDetection\StorageWrapper->file_put_contents("files/Notes/Test.txt", "*** sensiti ... *")

16.  /var/www/nextcloud/lib/private/Files/View.php - line 1160:
    OCA\RansomwareProtection\StorageWrapper->file_put_contents("files/Notes/Test.txt", "*** sensiti ... *")

17.  /var/www/nextcloud/lib/private/Files/View.php - line 694:
    OC\Files\View->basicOperation("file_put_contents", "/yostral/files/Notes/Test.txt", [ "update","write"], "*** sensiti ... *")

18.  /var/www/nextcloud/lib/private/Files/Node/File.php - line 71:
    OC\Files\View->file_put_contents("/yostral/files/Notes/Test.txt", "*** sensiti ... *")

19.  /var/www/nextcloud/apps/notes/lib/Service/NotesService.php - line 184:
    OC\Files\Node\File->putContent("*** sensiti ... *")

20.  /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 194:
    OCA\Notes\Service\NotesService->update("*** sensiti ... *")

21.  /var/www/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 170:
    OCA\Notes\Controller\NotesApiController->updateData("*** sensiti ... *")

22.  /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170:
    OCA\Notes\Controller\NotesApiController->update("*** sensiti ... *")

23.  /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Notes\Co ... {}, "update")

24.  /var/www/nextcloud/lib/private/AppFramework/App.php - line 125:
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Notes\Co ... {}, "update")

25.  /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:
    OC\AppFramework\App::main("OCA\\Notes\ ... r", "update", OC\AppFramew ... {}, { id: "24877 ... "})

26.  <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({ id: "24877 ... "})

27.  /var/www/nextcloud/lib/private/Route/Router.php - line 299:
    call_user_func(OC\AppFramew ... {}, { id: "24877 ... "})

28.  /var/www/nextcloud/lib/base.php - line 1008:
    OC\Route\Router->match("/apps/notes ... 5")

29.  /var/www/nextcloud/index.php - line 38:
    OC::handleRequest()

PUT /index.php/apps/notes/api/v0.2/notes/248775?
from my.ip.my.ip by yostral at 2020-03-31T07:55:08+00:00
ilovemilk commented 4 years ago

The 0.7.0 release only added Nextcloud version 18 support. I will release a 0.7.1 by the end of the week with a fix to this issue.

yostral commented 4 years ago

Ah ok. Sorry :) . I saw a major release, I thought it included all your fixes.

ilovemilk commented 4 years ago

I released version 0.7.1 which should fix this problem! :)

yostral commented 4 years ago

Thank you so much for your work ! It works now :)