Commit graph

3399 commits

Author SHA1 Message Date
Joas Schilling
139fb8de94
Remove "password reset token" after successful login 2016-08-23 12:54:45 +02:00
Lukas Reschke
3ed102497e Merge pull request #995 from nextcloud/workflow-section
Workflow section + hidden empty sections
2016-08-23 11:20:43 +02:00
Arthur Schiwon
5cd3f4e4dc
add test 2016-08-22 16:56:00 +02:00
Arthur Schiwon
baa91809bd
adjust test 2016-08-22 08:29:49 +02:00
Arthur Schiwon
7972fa5527
enlist only registered sections that also have settings registered to 2016-08-22 08:29:49 +02:00
Lukas Reschke
d50e7ee36c
Remove reading PATH_INFO from server variable
Having two code paths for this is unreliable and can lead to bugs. Also, in some cases Apache isn't setting the PATH_INFO variable when mod_rewrite is used.

Fixes https://github.com/nextcloud/server/issues/983
2016-08-19 14:48:13 +02:00
Julius Haertl
162b153f22
Fix loading of ThemingDefaults 2016-08-19 11:26:22 +02:00
Roeland Jago Douma
fe80bb1aff Merge pull request #867 from nextcloud/notification-primary-action-always-first
Make sure the primary action is always the first one
2016-08-17 19:31:14 +02:00
Vincent Petry
df9b509ed3
Improve regexp to detect duplicate folders when repairing unmerged shares 2016-08-17 15:31:47 +02:00
Vincent Petry
7a2d25fab4
Fix unmerged shares repair with mixed group and direct shares
Whenever a group share is created after a direct share, the stime order
needs to be properly considered in the repair routine, considering that
the direct user share is appended to the $subShares array and breaking
its order.
2016-08-17 15:31:36 +02:00
Vincent Petry
56b94b220d
Improve file_target finding logic when repairing unmerged shares
Pick the most recent subshare that has no parenthesis from duplication
which should match whichever name the user picked last. If all
subshares have duplicate parenthesis names, use the least recent group
share's target instead.
2016-08-17 15:31:35 +02:00
Roeland Jago Douma
c5d0a056de Merge pull request #868 from nextcloud/changepasswordcontroller
Make ChangePassword a real Controller
2016-08-17 11:50:41 +02:00
Joas Schilling
027069cbae Merge pull request #846 from nextcloud/provisioning_api_ocs
Move Provisioning API to the AppFramework
2016-08-17 10:23:13 +02:00
Roeland Jago Douma
789082e014
Add tests for ChangePasswordController 2016-08-17 10:21:18 +02:00
Marius Blüm
c1632c3abd Merge pull request #893 from nextcloud/ie8_be_gone
IE8 be gone!
2016-08-17 09:02:58 +02:00
Roeland Jago Douma
fd95985a21
Remove IE8 support in CertificateController
* Also fix getMock warnings in tests
2016-08-16 20:51:43 +02:00
Arthur Schiwon
4943441bde
adjust tests to latest changes 2016-08-16 18:59:45 +02:00
Arthur Schiwon
717e22267a
Merge branch 'master' into implement_712 2016-08-16 18:31:59 +02:00
Björn Schießle
6dc956b192 Merge pull request #886 from nextcloud/capabilities_error_proof
Make the capabilities manager more error proof
2016-08-16 11:40:42 +02:00
Lukas Reschke
6c6338b810
Merge branch 'master' into implement_712 2016-08-15 21:55:09 +02:00
Roeland Jago Douma
c044aa34fa
Make the capabilities manager more error proof
If an app registers an invalid capabilty we should not crash hard.
Instead we should catch the exception. Log it (error) and carry on.

* Added tests
2016-08-15 20:37:19 +02:00
Roeland Jago Douma
87ac72d004
We have to mock the is_uploaded_file in the OC\Core\Controller namespace 2016-08-15 20:08:20 +02:00
Roeland Jago Douma
09f4ce4389
Fix mock call in AvatarControllerTest 2016-08-15 20:07:07 +02:00
Lukas Reschke
cf3cfca356
Use generated URL 2016-08-15 17:37:55 +02:00
Lukas Reschke
910176c540
Fix CheckSetupController tests 2016-08-15 17:36:45 +02:00
Lukas Reschke
d6992e3f9f
Fix template test 2016-08-15 17:19:50 +02:00
Lukas Reschke
75d135d8d4
Fix tests for LoginController 2016-08-15 17:19:32 +02:00
Lukas Reschke
1c7fa3333e
Add reference to current user 2016-08-15 17:15:14 +02:00
Lukas Reschke
c16c411275
Add new dependency 2016-08-15 17:13:58 +02:00
Lukas Reschke
65d1472005
Don't use create mock
Not compatible with this PHPunit version
2016-08-15 17:08:27 +02:00
Lukas Reschke
166a7667d3
Use proper casing 2016-08-15 17:00:35 +02:00
Lukas Reschke
7ffb7b0d84
Use MockBuilder instead of createMock
CI uses an older PHPUnit
2016-08-15 16:43:22 +02:00
Lukas Reschke
8a7a0f3287
Add unit tests 2016-08-15 16:25:34 +02:00
Joas Schilling
3ed05f8769
Make sure the primary action is always the first one 2016-08-15 11:13:54 +02:00
Roeland Jago Douma
a0b22227fc
Add tests 2016-08-14 18:34:01 +02:00
Lukas Reschke
72b5f9bfac
Use createMock instead of deprecated getMock 2016-08-11 15:22:29 +02:00
Lukas Reschke
9ca25e857c
Redirect users when already logged-in on login form 2016-08-11 15:22:29 +02:00
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
b53ea18ea5
Match only for actual session cookie
OVH has implemented load balancing in a very questionable way where the reverse proxy actually internally adds some cookies which would trigger a security exception. To work around this, this change only checks for the session cookie.
2016-08-09 19:23:08 +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
Bjoern Schiessle
351cab6bce
skip shared files, if files get decrypted only for a specific user we shouldn't touch files owned by a different user. 2016-07-27 15:39:24 +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 Douma
f8167c0f9a Merge pull request #395 from nextcloud/user-preferences-occ
Allow to change user preferences via occ
2016-07-15 21:26:07 +02:00
Joas Schilling
aaf2be4c3d
Use argument instead of value 2016-07-14 15:09:47 +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
4656b79c8e
FIx my email 2016-07-13 18:46:27 +02:00
Joas Schilling
dcacdde1ea
Add tests for set/get/delete/list 2016-07-13 18:43:57 +02:00
Joas Schilling
f574a9d44f
Make sure the exception is catched 2016-07-13 18:43:53 +02:00
Joas Schilling
01899b8cf1
Add tests for checkInput() 2016-07-13 18:43:50 +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
Bjoern Schiessle
7c64e1973f
add test for needsRebundling() check 2016-07-11 15:51:48 +02:00
Roeland Jago Douma
3b4535c3be
Improve NodeTest
* Do not use DB
* Fix phpunit-5.4 warnigns
* Moved commong stuff to setup
2016-07-11 15:41:02 +02:00
Lukas Reschke
0c1cf5f7eb Merge pull request #347 from nextcloud/drop-windows-foo
Remove unneeded checks if it runs on a Windows machine
2016-07-11 13:16:03 +02:00
Joas Schilling
6ea77abb38
Fix some more tests 2016-07-11 10:59:27 +02:00
Morris Jobke
1ace70d2c2 Merge pull request #351 from nextcloud/improve_filetest_unittest
Improve FileTest
2016-07-11 10:40:13 +02:00