text icon indicating copy to clipboard operation
text copied to clipboard

[Bug]: audit log loop after uploading and overwite an existing README.md file

Open LiquidITGuy opened this issue 9 months ago • 3 comments

⚠️ This issue respects the following points: ⚠️

Bug description

When audit log is enabled, when we upload an existing file and overwite the existing file, a loop happen in the audit.log until the user quit nextcloud

{"reqId":"ffw1aRpzsDcjk7DZHlEi","level":1,"time":"2025-04-10T13:16:44+00:00","remoteAddr":"10.89.1.3","user":"admin","app":"admin_audit","method":"POST","url":"/apps/text/session/8/sync","message":"File with id \"8\" accessed: \"/Readme.md\"","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"31.0.0.18","data":{"app":"admin_audit"}}
{"reqId":"VJgj6Vgj9Ul8XQa0VlaH","level":1,"time":"2025-04-10T13:16:46+00:00","remoteAddr":"10.89.1.3","user":"admin","app":"admin_audit","method":"POST","url":"/apps/text/session/8/sync","message":"File with id \"8\" accessed: \"/Readme.md\"","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"31.0.0.18","data":{"app":"admin_audit"}}
{"reqId":"eiVbQ13N3YdhoLcLuCog","level":1,"time":"2025-04-10T13:16:51+00:00","remoteAddr":"10.89.1.3","user":"admin","app":"admin_audit","method":"POST","url":"/apps/text/session/8/sync","message":"File with id \"8\" accessed: \"/Readme.md\"","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"31.0.0.18","data":{"app":"admin_audit"}}
{"reqId":"rmS9ts38KG1tOYvQ6C46","level":1,"time":"2025-04-10T13:16:56+00:00","remoteAddr":"10.89.1.3","user":"admin","app":"admin_audit","method":"POST","url":"/apps/text/session/8/sync","message":"File with id \"8\" accessed: \"/Readme.md\"","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"31.0.0.18","data":{"app":"admin_audit"}}
{"reqId":"YjhV6CY9UrBTDPhzjtxj","level":1,"time":"2025-04-10T13:17:02+00:00","remoteAddr":"10.89.1.3","user":"admin","app":"admin_audit","method":"POST","url":"/apps/text/session/8/sync","message":"File with id \"8\" accessed: \"/Readme.md\"","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"31.0.0.18","data":{"app":"admin_audit"}}

Steps to reproduce

  1. enable audit log
  2. download readme.txt
  3. upload readme.txt
  4. overwrite the existing file

Expected behavior

no loop and only one event should be logged

Nextcloud Server version

master

Operating system

Debian/Ubuntu

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • [x] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report


List of activated Apps


Nextcloud Signing status


Nextcloud Logs


Additional info

No response

LiquidITGuy avatar Apr 10 '25 13:04 LiquidITGuy

And more of that I'm totaly stuck with this message (whatever the choice it take me into an infinite loop)

Image

LiquidITGuy avatar Apr 10 '25 13:04 LiquidITGuy

"POST","url":"/apps/text/session/8/sync"

These log entries are for a Text app editing session in the Web UI. Your reproduction steps, however, talk about downloading and uploading. Can you elaborate?

joshtrichards avatar Apr 10 '25 13:04 joshtrichards

I edited the file, downloaded the file from the webui then reuploading it at the same folder without any modification then this log happn in loop (even when I just click on file at the top level of nextcloud). (strangely, this bug does not happen again on another upload making the same way) My hypothese : my file was in a breaking state (do not know why ?) and because it is the readme wich is read by default on the top of the files the error making a loop

LiquidITGuy avatar Apr 10 '25 14:04 LiquidITGuy