Cant open password protected MS Office Files

  • Nextcloud Server version: 31.0.10
  • Operating system and version: Ubuntu 22.04.5 LTS
  • Web server and version : Apache 2.4.52-1ubuntu4.16
  • Reverse proxy and version: 1.28.0.1-v.ubuntu.22.04+p18.0.73.1+t251001.0636
  • PHP version : 8.29
  • Is this the first time you’ve seen this error? (Yes / No): Yes
  • Are you using CloudfIare, mod_security, or similar? *(Yes / No): Yes, mod_security 1:2.9.12-v.ubuntu.22.04+p18.0.72.0+t250806.0608

Summary of the issue you are facing:

I have a Nextcloud 31 installation here under Plesk with Nextcloud Office and a separate Collabora server with its own domain as a Docker/Portainer setup. Everything is working, I can create/open all file types. Only password-protected files created in MS Office cannot be opened. Both in the browser (Safari/Firefox) and in the iOS Nextcloud app, an error message appears: ‘Failed to load the document. Please ensure that the file type is supported and that the file is not corrupted, then try again.’ How can I fix this?

Steps to replicate it (hint: details matter!):

  1. Open password protected file in Nextcloud files