we can only store etags up to 40 characters long in the database, so when we get an etag that's longer we simply hash it to bring down the length
Signed-off-by: Robin Appelman <robin@icewind.nl>
- According to our administrator manual we should mention limitation to minimal and development/testing instances
Signed-off-by: Marius Blüm <marius@lineone.io>
This fixes collisions that were causing uploads to break in a very
terrible way.
Kudos to @kesselb for finding the problematic place and to
@hottwister for the proposed solution.
Fixes#10527.
* tests/acceptance/features/login.feature:15
<details><summary>Show full log</summary>
```
Scenario: log in with valid user and invalid password once fixed by admin # /drone/src/github.com/nextcloud/server/tests/acceptance/features/login.feature:15
Given I act as John # ActorContext::iActAs()
And I can not log in with user user0 and password 654231 # LoginPageContext::iCanNotLogInWithUserAndPassword()
When I act as Jane # ActorContext::iActAs()
And I am logged in as the admin # LoginPageContext::iAmLoggedInAsTheAdmin()
And I open the User settings # SettingsMenuContext::iOpenTheUserSettings()
And I set the password for user0 to 654321 # UsersSettingsContext::iSetTheFieldForUserTo()
And I act as John # ActorContext::iActAs()
And I log in with user user0 and password 654321 # LoginPageContext::iLogInWithUserAndPassword()
Then I see that the current page is the Files app # FilesAppContext::iSeeThatTheCurrentPageIsTheFilesApp()
Failed asserting that 'http://acceptance-login/index.php/login?user=user0' starts with "http://acceptance-login/index.php/apps/files/".
```
</details>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Fails with:
* tests/acceptance/features/app-files.feature:90
<details><summary>Show full log</summary>
```
Scenario: show favorites # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files.feature:90
Given I am logged in # LoginPageContext::iAmLoggedIn()
And I mark "welcome.txt" as favorite # FileListContext::iMarkAsFavorite()
When I open the "Favorites" section # AppNavigationContext::iOpenTheSection()
Then I see that the current section is "Favorites" # AppNavigationContext::iSeeThatTheCurrentSectionIs()
Then I see that the file list contains a file named "welcome.txt" # FileListContext::iSeeThatTheFileListContainsAFileNamed()
Row for file welcome.txt in file list could not be found after 100 seconds (NoSuchElementException)
```
</details>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Fails with:
* tests/acceptance/features/apps.feature:66
<details><summary>Show full log</summary>
```
Scenario: Show section from app store # /drone/src/github.com/nextcloud/server/tests/acceptance/features/apps.feature:66
Given I act as Jane # ActorContext::iActAs()
And I am logged in as the admin # LoginPageContext::iAmLoggedInAsTheAdmin()
And I open the Apps management # SettingsMenuContext::iOpenTheAppsManagement()
And I see that the current section is "Your apps" # AppNavigationContext::iSeeThatTheCurrentSectionIs()
When I open the "Files" section # AppNavigationContext::iOpenTheSection()
Files section item in App Navigation could not be found after 100 seconds (NoSuchElementException)
Then I see that there some apps listed from the app store # AppsManagementContext::iSeeThatThereSomeAppsListedFromTheAppStore()
And I see that the current section is "Files" # AppNavigationContext::iSeeThatTheCurrentSectionIs()
```
</details>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Fails with:
* tests/acceptance/features/app-files-tags.feature:42
<details><summary>Show full log</summary>
```
Scenario: add tags using the dropdown in the details view # /drone/src/github.com/nextcloud/server/tests/acceptance/features/app-files-tags.feature:42
Given I am logged in as the admin # LoginPageContext::iAmLoggedInAsTheAdmin()
And I visit the settings page # SettingsMenuContext::iVisitTheSettingsPage()
And I open the "Tag management" section # AppNavigationContext::iOpenTheSection()
And I see that the button to select tags is shown # SettingsContext::iSeeThatTheButtonToSelectTagsIsShown()
And I create the tag "tag1" in the settings # SettingsContext::iCreateTheTagInTheSettings()
And I create the tag "tag2" in the settings # SettingsContext::iCreateTheTagInTheSettings()
And I create the tag "tag3" in the settings # SettingsContext::iCreateTheTagInTheSettings()
And I create the tag "tag4" in the settings # SettingsContext::iCreateTheTagInTheSettings()
And I see that the dropdown for tags in the settings eventually contains the tag "tag1" # SettingsContext::iSeeThatTheDropdownForTagsInTheSettingsEventuallyContainsTheTag()
And I see that the dropdown for tags in the settings eventually contains the tag "tag2" # SettingsContext::iSeeThatTheDropdownForTagsInTheSettingsEventuallyContainsTheTag()
And I see that the dropdown for tags in the settings eventually contains the tag "tag3" # SettingsContext::iSeeThatTheDropdownForTagsInTheSettingsEventuallyContainsTheTag()
And I see that the dropdown for tags in the settings eventually contains the tag "tag4" # SettingsContext::iSeeThatTheDropdownForTagsInTheSettingsEventuallyContainsTheTag()
And I log out # SettingsMenuContext::iLogOut()
And I am logged in # LoginPageContext::iAmLoggedIn()
And I open the details view for "welcome.txt" # FileListContext::iOpenTheDetailsViewFor()
And I open the input field for tags in the details view # FilesAppContext::iOpenTheInputFieldForTagsInTheDetailsView()
When I check the tag "tag2" in the dropdown for tags in the details view # FilesAppContext::iCheckTheTagInTheDropdownForTagsInTheDetailsView()
And I check the tag "tag4" in the dropdown for tags in the details view # FilesAppContext::iCheckTheTagInTheDropdownForTagsInTheDetailsView()
Then I see that the tag "tag2" in the dropdown for tags in the details view is checked # FilesAppContext::iSeeThatTheTagInTheDropdownForTagsInTheDetailsViewIsChecked()
And I see that the tag "tag4" in the dropdown for tags in the details view is checked # FilesAppContext::iSeeThatTheTagInTheDropdownForTagsInTheDetailsViewIsChecked()
And I see that the input field for tags in the details view contains the tag "tag2" # FilesAppContext::iSeeThatTheInputFieldForTagsInTheDetailsViewContainsTheTag()
Failed asserting that false is true.
And I see that the input field for tags in the details view contains the tag "tag4" # FilesAppContext::iSeeThatTheInputFieldForTagsInTheDetailsViewContainsTheTag()
```
</details>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Fails with:
* build/integration/federation_features/federated.feature:183
* build/integration/federation_features/federated.feature:232
* build/integration/federation_features/federated.feature:247
* build/integration/federation_features/federated.feature:263
<details><summary>Show full log</summary>
```
Scenario: Reshare a federated shared file # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:183
Given Using server "REMOTE" # FederationContext::usingServer()
And user "user1" exists # FederationContext::assureUserExists()
And user "user2" exists # FederationContext::assureUserExists()
And Using server "LOCAL" # FederationContext::usingServer()
And user "user0" exists # FederationContext::assureUserExists()
And User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
And User "user1" from server "REMOTE" accepts last pending share # FederationContext::acceptLastPendingShare()
And Using server "REMOTE" # FederationContext::usingServer()
And As an "user1" # FederationContext::asAn()
When creating a share with # FederationContext::creatingShare()
| path | /textfile0 (2).txt |
| shareType | 0 |
| shareWith | user2 |
| permissions | 19 |
Then the OCS status code should be "100" # FederationContext::theOCSStatusCodeShouldBe()
Failed asserting that SimpleXMLElement Object &000000007d8e0d3c00000000403fd08a (
0 => '404'
) matches expected '100'.
...
{"message":"Can not find share with ID: 8"}
Scenario: Overwrite a federated shared folder as recipient # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:232
Given Using server "REMOTE" # FederationContext::usingServer()
And user "user1" exists # FederationContext::assureUserExists()
And user "user2" exists # FederationContext::assureUserExists()
And Using server "LOCAL" # FederationContext::usingServer()
And user "user0" exists # FederationContext::assureUserExists()
And User "user0" from server "LOCAL" shares "/PARENT" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
And User "user1" from server "REMOTE" accepts last pending share # FederationContext::acceptLastPendingShare()
And Using server "REMOTE" # FederationContext::usingServer()
And As an "user1" # FederationContext::asAn()
And User "user1" modifies text of "/textfile0.txt" with text "BLABLABLA" # FederationContext::modifyTextOfFile()
When User "user1" uploads file "../../data/user1/files/textfile0.txt" to "/PARENT (2)/textfile0.txt" # FederationContext::userUploadsAFileTo()
Client error: `PUT http://localhost:8180/remote.php/webdav/PARENT%20(2)/textfile0.txt` resulted in a `404 Not Found` response:
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DA (truncated...)
(GuzzleHttp\Exception\ClientException)
...
{"message":"Can not find share with ID: 10"}
Scenario: Overwrite a federated shared file as recipient using old chunking # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:247
Given Using server "REMOTE" # FederationContext::usingServer()
And user "user1" exists # FederationContext::assureUserExists()
And user "user2" exists # FederationContext::assureUserExists()
And Using server "LOCAL" # FederationContext::usingServer()
And user "user0" exists # FederationContext::assureUserExists()
And User "user0" from server "LOCAL" shares "/textfile0.txt" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
And User "user1" from server "REMOTE" accepts last pending share # FederationContext::acceptLastPendingShare()
And Using server "REMOTE" # FederationContext::usingServer()
And As an "user1" # FederationContext::asAn()
And user "user1" uploads chunk file "1" of "3" with "AAAAA" to "/textfile0 (2).txt" # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
Client error: `PUT http://localhost:8180/remote.php/webdav/textfile0%20(2).txt-chunking-42-3-0` resulted in a `404 Not Found` response:
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DA (truncated...)
(GuzzleHttp\Exception\ClientException)
...
{"message":"Can not find share with ID: 11"}
Scenario: Overwrite a federated shared folder as recipient using old chunking # /drone/src/github.com/nextcloud/server/build/integration/federation_features/federated.feature:263
Given Using server "REMOTE" # FederationContext::usingServer()
And user "user1" exists # FederationContext::assureUserExists()
And user "user2" exists # FederationContext::assureUserExists()
And Using server "LOCAL" # FederationContext::usingServer()
And user "user0" exists # FederationContext::assureUserExists()
And User "user0" from server "LOCAL" shares "/PARENT" with user "user1" from server "REMOTE" # FederationContext::federateSharing()
And User "user1" from server "REMOTE" accepts last pending share # FederationContext::acceptLastPendingShare()
And Using server "REMOTE" # FederationContext::usingServer()
And As an "user1" # FederationContext::asAn()
And user "user1" uploads chunk file "1" of "3" with "AAAAA" to "/PARENT (2)/textfile0.txt" # FederationContext::userUploadsChunkFileOfWithToWithChecksum()
Client error: `PUT http://localhost:8180/remote.php/webdav/PARENT%20(2)/textfile0.txt-chunking-42-3-0` resulted in a `404 Not Found` response:
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DA (truncated...)
(GuzzleHttp\Exception\ClientException)
...
{"message":"Can not find share with ID: 12"}
```
</details>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Fails with:
There was 1 failure:
1) TrashbinTest::testExpireOldFiles
Failed asserting that null is identical to 'file2.txt'.
/drone/src/github.com/nextcloud/server/apps/files_trashbin/tests/TrashbinTest.php:186
OR
1) TrashbinTest::testExpireOldFiles
Failed asserting that null is identical to 'file2.txt'.
/drone/src/github.com/nextcloud/server/apps/files_trashbin/tests/TrashbinTest.php:193
Signed-off-by: Morris Jobke <hey@morrisjobke.de>