fix: do not accept federated shares where the name is too long#40726
fix: do not accept federated shares where the name is too long#40726DeepDiver1975 merged 1 commit intomasterfrom
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
6769e8b to
d437bec
Compare
|
💥 Acceptance tests pipeline apiProxySmoke-8-8-mariadb10.2-php7.4 failed. The build has been cancelled. |
d437bec to
b1ba440
Compare
|
Kudos, SonarCloud Quality Gate passed! |
|
@jvillafanez please review again - thx |
|
I don't know how to confirm this.
From desktop-client: |
|
Not exaclty sure, where the length limit is. drone CI uses a 290 char string to trigger this. Yours is shorter: 233 chars. |
|
The https://github.com/owncloud/core/blob/master/lib/private/Files/View.php#L1921 which is then calling: https://github.com/owncloud/core/blob/master/lib/private/Files/Storage/Common.php#L505-L511 where a |
but, clients (including web) do not allow such amount of characters in the filename. So, that exception is never thrown. |
Ouch. This will explode, when versioning or trashcan add their suffixes to the filename. |
not related to this specific issue but, yes, we need to check what happens with occ |
|
The code path with these checks is not executed.
|
In a regular use case this will not happen because files on all servers have the correct file name length. This is a safety net against wrong usage of the http request. Submit an http request using curl. |
|
Tried to re-check:
NOTE: The share request doesn't hit the but hits core/apps/files_sharing/lib/Controller/Share20OcsController.php Lines 372 to 373 in 71e0ebe |
federatedfilesharing is the app -> not files_sharing .... |
worth an issue for further investigation |








Description
Federated shares with a too long name can result in in accessible shares on the receiving server
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: