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

xtcloError PHP Undefined variable: rows at /var/www/html/neud/apps/ransomware_detection/lib/Controller/ScanController.php#307 #5

Closed Githopp192 closed 5 years ago

Githopp192 commented 6 years ago

Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/64.0.3282.140 Safari\/537.36 Edge\/17.17134","version":"13.0.4.0"} {"reqId":"xxxxxxxxx","level":3,"time":"2018-09-23T13:50:08+02:00","remoteAddr":"xxxxxxxxx","user":"xxxxxxx","app":"PHP","method":"GET","url":"\/ocs\/v2.php\/apps\/ransomware_detection\/api\/v1\/files-to-scan","message":"Undefined variable: rows at \/var\/www\/html\/nextcloud\/apps\/ransomware_detection\/lib\/Controller\/ScanController.php#307","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/64.0.3282.140 Safari\/537.36 Edge\/17.17134","version":"13.0.4.0"}

The Log gets full of this Messages ..

ilovemilk commented 6 years ago

Hi, this message results from the analysis of the file activities and that some of your files are missing this information. I tried to reproduce this problem but it was not possible to trigger this error. Is there anything special about these files? I context of their creation or modification?

Nevertheless I will release a new version with a fix for your issue today or tomorrow, because this error can be easily avoided, but knowing why these informations are missing can assure the correctness of the scan.

Githopp192 commented 6 years ago

Hi ilovemilk, i checked the file permissons ..they are on Nextcloud Default. And they are normal files .. *.docx .. PDF, Photos .. When i'm logged in as "admin" User .. then the Scanning will work fine. But not when i'm logged in as normal user (no admin Rights).

I also did enable the following Activity flag --->

Ihre eigenen Aktivitäten im Stream auflisten .. (list your own Activities into the stream) .. but there is no difference .. as soon, i'll begin to scan the files .. the Nextcloud.log will fill with thousand of entries.

ilovemilk commented 6 years ago

Hi Githopp192, Thanks for the information. I tried to reproduce your error again but wasn't able to do so. I used files uploaded via the web interface and files shared by another account. Performing the scan on an user in the admin group and a user without any groups worked fine.

Enabling the activity flag shouldn't change anything because it only changes the activity view as far as I know.

Which version of Nextcloud are you using? Does the error relate to files which are in the trashbin? Or in the normal storage? Or both?

I will wait with a release until I can hopefully figure out the reason of the error because the only thing I could offer would be a supression.