summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/Connector/Sabre
Commit message (Collapse)AuthorAgeFilesLines
* respect shareapi_allow_share_dialog_user_enumeration in Principal backend ↵Georg Ehrke2019-12-031-6/+90
| | | | | | for Sabre/DAV Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* re-acquired expired shared locks on large file uploadsRobin Appelman2019-11-141-0/+21
| | | | | | | during large file uploads, the shared lock that we get at the begining can expire leading to locked errors later on, instead of erroring, try to re-get the lock Signed-off-by: Robin Appelman <robin@icewind.nl>
* use principaluri instead of userid, allowing to add delegates for rooms and ↵Georg Ehrke2019-08-151-16/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | things Signed-off-by: Georg Ehrke <developer@georgehrke.com> !fixup add owner_id and proxy_id as db index, since we use it for querying Signed-off-by: Georg Ehrke <developer@georgehrke.com> !fixup don't add ACL for each individual proxy, just use calendar-proxy groups Signed-off-by: Georg Ehrke <developer@georgehrke.com> !fixup allow delegation of resources / rooms Signed-off-by: Georg Ehrke <developer@georgehrke.com> !fixup fix addIndex call in migration Signed-off-by: Georg Ehrke <developer@georgehrke.com> !fixup fix remaining constructor calls of Principal Signed-off-by: Georg Ehrke <developer@georgehrke.com> !fixup minor fixes and unit tests Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Fix testsRoeland Jago Douma2019-08-111-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsRoeland Jago Douma2019-08-011-63/+37
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* add test for overwriting in non creatable directoryRobin Appelman2019-07-031-8/+46
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Prefetching blows up if there are a lot of files.Roeland Jago Douma2019-04-181-4/+0
| | | | | | | | I saw instances where people had a lot of files (each with custom properties) and all this prefetching blew up and started to consume an insane amount of RAM resulting in the process getting killed. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* implement principal property search for calendar user address set propertyGeorg Ehrke2019-03-211-0/+26
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Use dependency injection for app managerMorris Jobke2019-03-131-1/+10
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use proper dependency injection for app managerMorris Jobke2019-03-051-1/+8
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix unit testsJoas Schilling2019-02-221-1/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix testsRoeland Jago Douma2018-11-042-20/+10
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* update dav testsRobin Appelman2018-10-311-3/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* allow user principal search for dav displayname propertyGeorg Ehrke2018-10-221-13/+47
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* move disableFreeBusy check from User principal backend to Scheduling Outbox ↵Georg Ehrke2018-10-161-98/+41
| | | | | | collection. This allows to keep local delivery of scheduling messages while prohibiting FreeBusy requests Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Add room shares to DAV and recent files "share-types" propertyDaniel Calviño Sánchez2018-08-081-0/+1
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix getting ocs share permissions if a storage is not availableRobin Appelman2018-07-181-1/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* allow admins to override FreeBusy capabilities without modifying ShareAPI ↵Georg Ehrke2018-05-221-81/+147
| | | | | | capabilities Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* use SystemConfig, less dependencies, and not publicly neededArthur Schiwon2018-04-261-2/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix dav testArthur Schiwon2018-04-261-1/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* offer API to create own File log. admin_audit makes use of itArthur Schiwon2018-04-261-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* destaticfy Log classesArthur Schiwon2018-04-261-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* adjust tests to new exception log formatRobin Appelman2018-04-111-8/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Loglevel is an intRoeland Jago Douma2018-02-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make ILogger strictRoeland Jago Douma2018-02-271-1/+1
| | | | | | | * Make implementations strict * Add scalar typehints Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix risky tests without assertionsJoas Schilling2018-01-253-2/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix "Undefined method setExpectedException()"Joas Schilling2018-01-241-1/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Handle OC-Total-Length in new chunkingThomas Müller2017-12-152-57/+4
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* fix dav unit testsBjoern Schiessle2017-12-121-3/+3
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Principal search: Take sharing settings into accountGeorg Ehrke2017-12-111-13/+175
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Merge pull request #7313 from ↵Morris Jobke2017-12-111-2/+136
|\ | | | | | | | | nextcloud/ensure-that-x-oc-mtime-header-is-an-integer-with-chunked-uploads Ensure that X-OC-MTime header is an integer with chunked uploads
| * Reject X-OC-MTime header if given as a string with hexadecimal notationDaniel Calviño Sánchez2017-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In PHP 7.X hexadecimal notation support was removed from "is_numeric", so "sanitizeMtime" directly rejected those values; in PHP 5.X, on the other hand, "sanitizeMtime" returned 0 when a string with hexadecimal notation was given (as it was the behaviour of "intval"). To provide a consistent behaviour between PHP versions, and given that it does not make much sense to send X-OC-MTime in hexadecimal notation, now X-OC-MTime is always rejected if given as a string with hexadecimal notation. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Don't use runInSeparateProcessThomas Müller2017-11-271-5/+5
| | | | | | | | | | | | | | | | | | | | Directly calling "header" in the PHPUnit process causes the "Cannot modify header information - headers already sent by" error to be thrown. Instead of running the test in a separate process, which is slower, this commit wraps the call to "header" in a method that can be mocked in the tests. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add tests for X-OC-MTime header handlingDaniel Calviño Sánchez2017-11-271-0/+133
| | | | | | | | | | | | | | | | | | | | | | This commit is based on the commits from pull request 28066 (included in 018d45cad97e0) from ownCloud by Artur Neumann and Phil Davis. Unit tests are currently run only on systems that support negative mtimes, so no special handling of negative values was included in the tests to keep the test code more manageable. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Make possible to provide a specific HTTP request object to FileDaniel Calviño Sánchez2017-11-271-2/+3
| | | | | | | | | | | | | | | | | | | | This will be used in a following commit to test how the X-OC-MTime header is handled. This commit is based on the "make File::put() more testable" commit (included in 018d45cad97e0) from ownCloud by Artur Neumann. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix testsRoeland Jago Douma2017-12-041-0/+2
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #7047 from ↵Björn Schießle2017-11-201-9/+11
|\ | | | | | | | | nextcloud/add-support-for-files-with-no-permissions Add support for files with no permissions
| * Return whether the file is readable or not in the DAV permissionsDaniel Calviño Sánchez2017-11-021-9/+11
| | | | | | | | | | | | | | | | | | | | Until now it was safe to assume that every file was readable by its owner, so there was no need to return whether the file was readable or not. However, with the introduction of end to end encryption that is no longer the case, and it is now necessary to explicitly provide that information. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Update license headersMorris Jobke2017-11-0625-6/+30
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix another warningMorris Jobke2017-10-261-4/+5
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocks of dav appMorris Jobke2017-10-2613-46/+68
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocksMorris Jobke2017-10-2416-112/+157
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix quota calculation on new dav upload endpointRoeland Jago Douma2017-09-131-3/+8
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not log WebDAV maintenance mode exceptionMorris Jobke2017-08-151-0/+3
| | | | | | Log the maintenance mode exception only in debug level. Fixes #6124 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* fix and extend dav test to also test the master-key setupBjoern Schiessle2017-07-062-0/+52
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Don't log passwords on dav exceptionsJoas Schilling2017-06-291-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #5124 from nextcloud/allow-dirlisting-with-unreadable-itemsJoas Schilling2017-06-161-4/+5
|\ | | | | Allow dir-listing also when one child is blocked by access control
| * Fix unit testJoas Schilling2017-06-071-4/+5
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Prevent sending second WWW-Authenticate headerLukas Reschke2017-06-131-3/+9
|/ | | | | | | | Overrides \Sabre\DAV\Auth\Backend\AbstractBearer::challenge to prevent sending a second WWW-Authenticate header which is standard-compliant but most DAV clients simply fail hard. Fixes https://github.com/nextcloud/server/issues/5088 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Make legacy DAV backend use the BearerAuth backend as wellLukas Reschke2017-05-181-1/+2
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>