Commit graph

2851 commits

Author SHA1 Message Date
Roeland Jago Douma
1f370c97ed
OCSController requires DataResponse
The OCS Controller requires a DataResponse object to be returned.
This means that all error handling will have to be done via exceptions
thrown and handling in the middleware.
2016-08-10 12:40:26 +02:00
Lukas Reschke
9fbdb0efe8 Merge pull request #529 from nextcloud/vendor-maintenance-downgrade
Allow downgrades of maintenance accross vendors
2016-08-10 00:25:53 +02:00
Lukas Reschke
5214b62d55 Merge pull request #691 from nextcloud/ocs_allow_all_old_routes
Allow ocs/v2.php/cloud/... routes
2016-08-09 20:52:49 +02:00
Lukas Reschke
b4ed4e152e Merge pull request #746 from nextcloud/jail-root
getJailedPath expects $path to have a trailing /
2016-08-09 11:04:11 +02:00
Roeland Jago Douma
0032a5c2d1
Hanlde Core and Settings app in AppFramework
'core' and 'settings' are just apps but we treat them slightly
different. Make sure that we construct the correct namespace so we can
actually do automatic AppFramework stuff.
2016-08-08 20:48:16 +02:00
Roeland Jago Douma
63f6d2d558
Allow ocs/v2.php/cloud/... routes
One of the possibilities of the old OCS API is that you can define the
url yourself.

This PR makes this possible again by adding an optional root elemenet to
the route. Routes are thus:

.../ocs/v2.php/<root>/<url>

By default <root> = apps/<app>

This will allow for example the provisioning API etc to be in
../ovs/v2/php/cloud/users
2016-08-08 15:01:26 +02:00
Joas Schilling
f37fa6e45c
Move Share backends to PSR-4 instead of using class path (#24941) 2016-08-05 14:13:41 +02:00
Thomas Müller
f1cd68d713 Adding test case for getPathById including a jailed cache where root is just empty 2016-08-05 14:06:05 +02:00
Vincent Petry
0c6352e095
Fix RepairUnmergedShares to not skip valid repair cases
The repair step was a bit overeager to skip repairing so it missed the
case where a group share exists without subshares but with an
additional direct user share.
2016-08-03 10:16:28 +02:00
Vincent Petry
67fa6bf9bc
Add repair step for unmerged shares (WIP) 2016-08-03 10:16:28 +02:00
Roeland Jago Douma
5c718b13b8
We should properly check for 'true' instaed of the bool 2016-08-01 08:52:50 +02:00
Roeland Jago Douma
f7f5216aa3
Dark hackery to not always disable CSRF for OCS controllers 2016-07-29 15:49:27 +02:00
Morris Jobke
54ae8eede3 Merge pull request #556 from nextcloud/nextcloud-version-check
Allow apps to check for a given nextcloud version
2016-07-29 09:26:25 +02:00
Roeland Jago Douma
8bdd0adcee
Support subdir in the OCS v2 endpoint
We should check against the ending substring since people could
run their nextcloud in a subfolder.

* Added test
2016-07-27 15:28:35 +02:00
Morris Jobke
9c21067c19
fix enabled apps tests 2016-07-27 08:36:03 +02:00
Morris Jobke
6482be040b
fix unit tests 2016-07-26 16:43:58 +02:00
Joas Schilling
0fcc39cd8e
Translate the server version for nextcloud 2016-07-26 14:40:18 +02:00
Morris Jobke
2f42a3fc31
Add workflowengine 2016-07-26 11:16:34 +02:00
William Bargent
352e24e703 Merge pull request #292 from nextcloud/recent-files
Add "Recent" file listing
2016-07-25 15:25:02 +01:00
Joas Schilling
4ad0c383ad Merge pull request #523 from Faldon/master
Renamed file logging
2016-07-25 11:41:24 +02:00
Robin Appelman
81e103074e use limit instead of since when listing recent files 2016-07-22 15:20:55 +02:00
Robin Appelman
a4ba3eadd0 fix test 2016-07-22 15:20:55 +02:00
Joas Schilling
5c34346479
Allow downgrades of maintenance accross vendors 2016-07-22 14:51:43 +02:00
Thomas Pulzer
61a1d56d27 Renamed test classes for file logging tests. 2016-07-22 14:47:50 +02:00
Robin Appelman
e321ecd592 add recent files to node api 2016-07-22 14:39:32 +02:00
Roeland Jago Douma
72b06d250d
Add tests 2016-07-22 12:53:47 +02:00
Thomas Pulzer
ba3f4f118e Changed logtype to file instead of owncloud.
- Updated the config sample to point to log_type='file'
- Renamed the Class for logfile logging to File in namespace 'OC\Log\'.
  Changed the occurrences of 'OC\Log\Owncloud' to 'OC\Log\File'.
- Renamed the Class for log:file command to File in namespace 'OC\Core\Command\Log\File'.
  Changed registration of the command to use 'OC\Core\Command\Log\File'.
- Changed default Syslog tag to Nextcloud
- Retained backwards compatibility for configs with 'logtype' => 'owncloud'

- Adjusted tests for the new file log.

Closes #490.
2016-07-22 11:44:19 +02:00
Lukas Reschke
c385423d10 Merge pull request #479 from nextcloud/add-bruteforce-throttler
Implement brute force protection
2016-07-21 00:31:02 +02:00
Lukas Reschke
c1589f163c
Mitigate race condition 2016-07-20 23:09:27 +02:00
Lukas Reschke
ba4f12baa0
Implement brute force protection
Class Throttler implements the bruteforce protection for security actions in
Nextcloud.

It is working by logging invalid login attempts to the database and slowing
down all login attempts from the same subnet. The max delay is 30 seconds and
the starting delay are 200 milliseconds. (after the first failed login)
2016-07-20 22:08:56 +02:00
Lukas Reschke
020a2a6958 Merge pull request #476 from nextcloud/port-same-site-cookies
[master] Port Same-Site Cookies to master
2016-07-20 21:35:02 +02:00
Roeland Douma
78cad699fe Merge pull request #475 from nextcloud/ocs-middleware
Add OCS Middleware
2016-07-20 21:04:25 +02:00
Morris Jobke
e08278494d Merge pull request #471 from nextcloud/storage-fopenspecialchars
Added storage tests for fopen with special chars
2016-07-20 20:56:59 +02:00
Roeland Jago Douma
5f32b57332
Add unit tests 2016-07-20 20:03:49 +02:00
Lukas Reschke
a299fa38a9
[master] Port Same-Site Cookies to master
Fixes https://github.com/nextcloud/server/issues/50
2016-07-20 18:37:57 +02:00
Morris Jobke
1264e9644f Merge pull request #402 from nextcloud/smb-notifications
smb update notifications
2016-07-20 16:19:21 +02:00
Vincent Petry
631af42b3a
Added storage tests for fopen with special chars
This makes it possible to test special chars with unit tests.
There is already a test for directories but there was none for file
names.
2016-07-20 15:13:24 +02:00
Roeland Jago Douma
0bda09236e
Add route tests 2016-07-18 11:09:49 +02:00
Roeland Douma
6f9236fb3b Merge pull request #381 from nextcloud/postgres-setup
use pdo for postgres setup
2016-07-15 21:30:51 +02:00
Roeland Jago Douma
a3fa0d00c3
Cleanup ManagerTest
* Fix deprecated getMock call
* No longer requires DB
2016-07-14 13:49:18 +02:00
Joas Schilling
c04e7b13c3 Merge pull request #392 from nextcloud/roottest_nodb
RootTest does not require DB
2016-07-13 16:54:19 +02:00
Robin Appelman
29eeeb2273 Save the files external mount id in the mount cache table 2016-07-13 16:34:08 +02:00
Roeland Jago Douma
927be847b9
RootTest does not require DB
* Removed from DB group
* Also mock the manager
* Fixed deprecated getMock warnings
2016-07-13 14:35:34 +02:00
Robin Appelman
b288c6796a fix test 2016-07-13 14:33:04 +02:00
Roeland Jago Douma
f2d091a963
Fix failing tests after db split 2016-07-13 09:26:19 +02:00
Roeland Jago Douma
8d739f308b
Some UtilTests require DB
In the current setup there is no DI so no way to mock them.
2016-07-11 21:05:39 +02:00
Roeland Jago Douma
5b6f5f1a07
LegacyGroupTest need DB
Those old tests make it impossible in the current state to abstract
away.
2016-07-11 21:02:27 +02:00
Roeland Jago Douma
4ebf001b2e
Improve ManagerTest
* No DB required
* Fixed phpunit 5.4 warnings
2016-07-11 21:02:27 +02:00
Roeland Jago Douma
31018adab3
Improve GroupTest
* No longer require DB
2016-07-11 21:02:27 +02:00
Björn Schießle
e8169e0d71 Merge pull request #364 from nextcloud/ca-bundle-tests
add test for needsRebundling() check
2016-07-11 17:34:31 +02:00