summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix unit testsJoas Schilling2020-09-151-0/+12
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix clicks on actions menu of non opaque file rows in acceptance testsDaniel Calviño Sánchez2020-08-311-7/+36
| | | | | | | | | | | | | | | | When a row is added to the file list the opacity of the file row is animated from transparent to fully opaque. As the file actions menu is a descendant of the row but overflows it when the row is not fully opaque clicks on the menu entries "fall-through" and are received instead by the rows behind. The opacity animation is a CSS animation, and it is not possible to know if a row is appearing or not except from its opacity (the row will have the "appear" CSS class even after the animation ended). Therefore it should be waited until the row of the file is fully opaque before using the menu. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* use exceptions for error signaling in writeStreamRobin Appelman2020-07-311-1/+0
| | | | | | this remove the ambiguity when writing zero length files Signed-off-by: Robin Appelman <robin@icewind.nl>
* rollback cache rename if trashbin move failsRobin Appelman2020-07-311-9/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove deprecated test of internal attributes via assertAttributeEquals in ↵Morris Jobke2020-07-303-32/+0
| | | | | | | | | | | | constructor tests I removed the tests completely because they just test that the constructor assigns the values to the internal properties. Nothing that should be cared about from the outside. See https://github.com/sebastianbergmann/phpunit/issues/3339#issuecomment-428843322 It is seen as bad practice to test internal stuff of objects instead of the actual input and output of mathod calls. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use assertEqualsCanonicalizing instead of deprecated assertEquals parameterMorris Jobke2020-07-301-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove deprecated test of internal attributes via assertAttributeEqualsMorris Jobke2020-07-302-17/+11
| | | | | | | | See https://github.com/sebastianbergmann/phpunit/issues/3339#issuecomment-428843322 It is seen as bad practice to test internal stuff of objects instead of the actual input and output of mathod calls. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use assertStringContainsString instead of assertContains on stringsMorris Jobke2020-07-306-18/+18
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* ensure mounts are scanned during testsRobin Appelman2020-07-092-1/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use the correct mountpoint to calculateRoeland Jago Douma2020-07-091-0/+9
| | | | | | | If we use the owners mount point this results in null. And then the rest of the checks get called with null. Which doesn't work. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #21499 from lmamane/stable18-21285-onelinerMorris Jobke2020-07-081-5/+6
|\ | | | | fix #21285 as oneliner
| * adapt testGetLoginCredentialsInvalidTokenLoginCredentials() unit test to uid ↵Lionel Elie Mamane2020-06-201-5/+6
| | | | | | | | | | | | != loginname Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
* | Merge pull request #21575 from nextcloud/backport/21379/stable18Morris Jobke2020-07-062-9/+216
|\ \ | | | | | | [stable18] Fix share permission checkboxes enabled when permissions can not be set
| * | Add acceptance test for disabling create permission after sharingDaniel Calviño Sánchez2020-06-241-0/+43
| | | | | | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * | Add acceptance test for sharing a folder without create permissionDaniel Calviño Sánchez2020-06-242-0/+75
| | | | | | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * | Add acceptance test for sharing a file without edit permissionDaniel Calviño Sánchez2020-06-242-0/+75
| | | | | | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * | Generalize functions to get locators for share permission checkboxesDaniel Calviño Sánchez2020-06-241-9/+23
| | | | | | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | | Merge pull request #21670 from nextcloud/revert-21096-backport/21090/stable18Roeland Jago Douma2020-07-061-2/+3
|\ \ \ | | | | | | | | Revert "[stable18] Do not read certificate bundle from data dir by default"
| * | | Revert "[stable18] Do not read certificate bundle from data dir by default"Roeland Jago Douma2020-07-031-2/+3
| | | |
* | | | Merge pull request #21388 from nextcloud/backport/21380/stable18Roeland Jago Douma2020-07-041-7/+7
|\ \ \ \ | |/ / / |/| | | [stable18] Increase timeout of the appstore requests
| * | | Increase timeout of the appstore requestsJoas Schilling2020-07-031-7/+7
| | |/ | |/| | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Merge pull request #21551 from nextcloud/backport/21535/stable18Roeland Jago Douma2020-07-021-12/+29
|\ \ \ | | | | | | | | [stable18] Fix language in share notes email for users
| * | | Fix language in share notes email for usersJoas Schilling2020-06-241-12/+29
| | |/ | |/| | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Fix IPv6 remote addresses from X_FORWARDED_FOR headers before validatingJoas Schilling2020-07-021-0/+28
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Fix unit testsJoas Schilling2020-06-231-37/+47
|/ / | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | acceptence tests shall specify which branch to pick when cloning appsArthur Schiwon2020-06-191-1/+2
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Merge pull request #21381 from nextcloud/backport/20447/stable18Roeland Jago Douma2020-06-193-3/+3
|\ \ | | | | | | [stable18] Increase max-height on button in welcome email template
| * | Fix testsMorris Jobke2020-06-183-3/+3
| |/ | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* / Clean up auth tokens when user is deletedChristoph Wurst2020-06-181-0/+117
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #21160 from nextcloud/backport/21152/stable18Roeland Jago Douma2020-06-061-9/+244
|\ | | | | [stable18] [stable18] Fix password changes in link and mail shares
| * Fix disabling send password by Talk without new password in mail sharesDaniel Calviño Sánchez2020-05-291-5/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "send password by Talk" was disabled in a mail share it was possible to keep the same password as before, as it does not pose any security issue (unlike keeping it when "send password by Talk" is enabled, as in that case the password was already disclosed by mail). However, if a mail share is updated but the password is not set again only the hashed password will be available. In that case it would not make sense to send the password by mail, so now the password must be changed when disabling "send password by Talk". Note that, even if explicitly setting the same password again along with the "send password by Talk" property would work, this was also prevented for simplicity. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Fix enabling send password by Talk with same password in mail sharesDaniel Calviño Sánchez2020-05-291-4/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | When "send password by Talk" is enabled in a mail share a new password must be also set. However, when the passwords of the original and the new share were compared it was not taken into account that the original password is now hashed, while the new one is not (unless no new password was sent, in which case the password of the original share was set in the new share by the controller, but that was already prevented due to both passwords being literally the same), so it was possible to set the same password again. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Fix enabling send password by Talk with empty password in link sharesDaniel Calviño Sánchez2020-05-291-0/+69
| | | | | | | | | | | | | | When "send password by Talk" is enabled in a link share now a non empty password is enforced. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Prevent harder to share your rootJoas Schilling2020-06-041-2/+4
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Revert "[stable18] Fix password changes in link and mail shares"Morris Jobke2020-05-291-244/+9
|
* Fix disabling send password by Talk without new password in mail sharesDaniel Calviño Sánchez2020-05-291-5/+79
| | | | | | | | | | | | | | | | | | When "send password by Talk" was disabled in a mail share it was possible to keep the same password as before, as it does not pose any security issue (unlike keeping it when "send password by Talk" is enabled, as in that case the password was already disclosed by mail). However, if a mail share is updated but the password is not set again only the hashed password will be available. In that case it would not make sense to send the password by mail, so now the password must be changed when disabling "send password by Talk". Note that, even if explicitly setting the same password again along with the "send password by Talk" property would work, this was also prevented for simplicity. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix enabling send password by Talk with same password in mail sharesDaniel Calviño Sánchez2020-05-291-4/+96
| | | | | | | | | | | | | When "send password by Talk" is enabled in a mail share a new password must be also set. However, when the passwords of the original and the new share were compared it was not taken into account that the original password is now hashed, while the new one is not (unless no new password was sent, in which case the password of the original share was set in the new share by the controller, but that was already prevented due to both passwords being literally the same), so it was possible to set the same password again. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix enabling send password by Talk with empty password in link sharesDaniel Calviño Sánchez2020-05-291-0/+69
| | | | | | | When "send password by Talk" is enabled in a link share now a non empty password is enforced. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #21109 from nextcloud/backport/19793/stable18Roeland Jago Douma2020-05-281-18/+0
|\ | | | | [stable18] Fix resharing of federated shares that were created out of links
| * Remove unneeded test since links have resharing permissions by defaultJulius Härtl2020-05-261-18/+0
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | use the loginname to verify the old password in user password changesArthur Schiwon2020-05-261-5/+27
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Do not read certificate bundle from data dir by defaultMorris Jobke2020-05-251-3/+2
|/ | | | | | | | | | | Before the resources/config/ca-bundle.crt was only used when the list of custom certificates was empty and the instance was not installed. But it should also be used when the list is empty and the instance is installed. This is inverting the logic to stop if the instance is not installed to use the default bundle. And it also does this when the list is empty. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #20965 from nextcloud/backport/20033/stable18Morris Jobke2020-05-252-2/+18
|\ | | | | [stable18] Enable fseek for files in S3 storage
| * add basic tests for s3 seeking and add some error handling if reopen return ↵Robin Appelman2020-05-202-2/+18
| | | | | | | | | | | | the wrong range Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Compress the appstore requests by defaultMorris Jobke2020-05-201-5/+42
| | | | | | | | | | | | In test it reduced the transfered data from 5 MB to 2 MB. This should reduce the load on the appstore significantly. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Cache appstore requests for 60 instead of 5 minutesMorris Jobke2020-05-201-7/+7
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Fix http cache testClement Wong2020-05-131-1/+1
|/ | | | Signed-off-by: Clement Wong <git@clement.hk>
* Merge pull request #20574 from nextcloud/backport/16035/stable18Morris Jobke2020-05-121-40/+56
|\ | | | | [stable18] dont show remote and email options if we have an exact match for local user email
| * dont show remote and email options if we have an exact match for local user ↵Robin Appelman2020-05-121-40/+56
| | | | | | | | | | | | email Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Use random_bytesRoeland Jago Douma2020-05-111-1/+8
|/ | | | | | | Since we don't care if it is human readbale. The code is backwards compatible with the old format. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>