You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a file added to my nextcloud wit a space in the file name, it does show a preview of the file, but when the file is clicked, or attempted to download I get an error "app not installed" (without telling me which app!?
Steps to reproduce
upload file (an image, or a document, does not matter)
open it via the web interface
error..
Expected behavior
opening/downloading the file!
Installation method
Community Web installer on a VPS or web space
Nextcloud Server version
25
Operating system
RHEL/CentOS
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 22.2.3 to 22.2.4)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Default user-backend (database)
LDAP/ Active Directory
SSO - SAML
Other
Configuration report
not the problem, I have figured out the cause, read on.. ;)
List of activated Apps
not the problem, I have figured out the cause, read on.. ;)
Nextcloud Signing status
not the problem, I have figured out the cause, read on.. ;)
Nextcloud Logs
not the problem, I have figured out the cause, read on.. ;)
Additional info
I started digging in the system, and found the cause!
In /lib/private/AppFramework/Http/ there is a file called Request.php with in function getRawPathInfo the line:
$scriptName = $this->server['SCRIPT_NAME'];
here $scriptName gets the content of the server variable 'SCRIPT_NAME'. The odd thing is that when I click on an image without a space the images is retrieved via:
https://[domain]/remote.php/dav/files/[user]/file_without_space.jpg
then the $scriptName gets the content: 'remote.php'
when a file WITH space is clicked in the web-interface:
This is not surprising, but the $scriptName now has the content: '/remote.php/dav/files/[user]/file with space.jpg'
This is exactly the same as $_SERVER['SCRIPT_NAME'], so I am guessing this might very well be an bug in Almalinux? (version 8.7)
But this makes a mess of the rest of the function, '\Sabre\Uri\split' splits on the space resulting in not detecting that it is a DAV call, resulting in the strange error..
I "Q&D" fixed by adding this below/at the mentioned line:
Bug description
I have a file added to my nextcloud wit a space in the file name, it does show a preview of the file, but when the file is clicked, or attempted to download I get an error "app not installed" (without telling me which app!?
Steps to reproduce
Expected behavior
opening/downloading the file!
Installation method
Community Web installer on a VPS or web space
Nextcloud Server version
25
Operating system
RHEL/CentOS
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 22.2.3 to 22.2.4)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
I started digging in the system, and found the cause!
In /lib/private/AppFramework/Http/ there is a file called Request.php with in function getRawPathInfo the line:
$scriptName = $this->server['SCRIPT_NAME'];
here $scriptName gets the content of the server variable 'SCRIPT_NAME'. The odd thing is that when I click on an image without a space the images is retrieved via:
https://[domain]/remote.php/dav/files/[user]/file_without_space.jpg
then the $scriptName gets the content: 'remote.php'
when a file WITH space is clicked in the web-interface:
https://[domain]/remote.php/dav/files/[user]/file%20with%20space.jpg
This is not surprising, but the $scriptName now has the content: '/remote.php/dav/files/[user]/file with space.jpg'
This is exactly the same as $_SERVER['SCRIPT_NAME'], so I am guessing this might very well be an bug in Almalinux? (version 8.7)
But this makes a mess of the rest of the function, '\Sabre\Uri\split' splits on the space resulting in not detecting that it is a DAV call, resulting in the strange error..
I "Q&D" fixed by adding this below/at the mentioned line:
It might not be the perfect solution, but it does do the trick! I can now view, open and download files with spaces (again?)!
The text was updated successfully, but these errors were encountered: