Commit graph

155 commits

Author SHA1 Message Date
Joas Schilling
ed30b1f645
Use our base class everywhere
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-06 14:11:04 +02:00
Morris Jobke
c84dc6aa1c Properly catch password policy hint for personal page password changes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-10-06 10:55:33 +02:00
Joas Schilling
a1e4b17ff4
Remove unused endpoint
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-30 10:21:08 +02:00
Joas Schilling
877cb06bfe
Use magic DI for core controllers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-30 10:00:26 +02:00
Roeland Jago Douma
8a5af2d335
Fix tests
* hasParameterOption has an additional default value which we must match
  in the return map
* Fix deprecated getMock calls
2016-09-06 21:20:01 +02:00
Roeland Jago Douma
3a3a17b2e3
Fix getMock TwoFactorMiddlewareTest 2016-09-06 09:29:27 +02:00
Lukas Reschke
06fa486706 Merge pull request #1158 from nextcloud/cache_avatars
Cache avatars
2016-09-05 15:08:43 +02:00
Christoph Wurst
8acb734854
add 2fa backup codes app
* add backup codes app unit tests
* add integration tests for the backup codes app
2016-09-05 08:51:13 +02:00
Roeland Jago Douma
74fdaab870
Fix depreccated getMock in Core/Command tests 2016-09-01 09:20:54 +02:00
Christoph Wurst
8e5c4c91fa check same URL in unit tests 2016-08-30 13:28:04 +02:00
Christoph Wurst
0a0c7a9b92 redirect to default app after solving the 2FA challenge 2016-08-30 11:10:45 +02:00
Roeland Jago Douma
6a85882f61
Fix tests 2016-08-30 09:00:22 +02:00
Morris Jobke
e341bde8b9 Merge pull request #1172 from nextcloud/core_cleanup
Core controller cleanup
2016-08-30 08:32:55 +02:00
Roeland Jago Douma
b1a090f357
AvatarController use proper JSONResponse
* Do not rely on DataResponse magic. We want JSON so use JSON
* Fix tests
2016-08-29 21:52:14 +02:00
Roeland Jago Douma
f6423f74e3
Minor cleanup in core Controllers 2016-08-29 21:52:09 +02:00
Christoph Wurst
291dd0bd31 redirect to 2fa provider if there's only one active for the user 2016-08-29 18:36:39 +02:00
Lukas Reschke
8bf9be2167 Merge pull request #1058 from nextcloud/avatarController_cleanup
Avatar controller cleanup
2016-08-27 22:25:34 +02:00
Joas Schilling
89c78bbce4 Merge pull request #1031 from nextcloud/2fa-infinite-redirect-loop
prevent infinite redirect loops if the there is no 2fa provider to pass
2016-08-26 16:03:05 +02:00
Roeland Jago Douma
2f03853fb9
AvatarController cleanup
* Use all DI components
* Let the AppFramework resolve the AvatarController
* Update unit tests
* Unit tests no longer require DB
2016-08-25 21:39:14 +02:00
Christoph Wurst
6af2efb679
prevent infinite redirect loops if the there is no 2fa provider to pass
This fixes infinite loops that are caused whenever a user is about to solve a 2FA
challenge, but the provider app is disabled at the same time. Since the session
value usually indicates that the challenge needs to be solved before we grant access
we have to remove that value instead in this special case.
2016-08-24 10:49:23 +02:00
Joas Schilling
736e884e9a
Move the reset token to core app 2016-08-23 15:01:38 +02:00
Joas Schilling
139fb8de94
Remove "password reset token" after successful login 2016-08-23 12:54:45 +02:00
Roeland Jago Douma
789082e014
Add tests for ChangePasswordController 2016-08-17 10:21:18 +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
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
65d1472005
Don't use create mock
Not compatible with this PHPunit version
2016-08-15 17:08:27 +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
Thomas Pulzer
61a1d56d27 Renamed test classes for file logging tests. 2016-07-22 14:47:50 +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
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
Joas Schilling
aaf2be4c3d
Use argument instead of value 2016-07-14 15:09:47 +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
Morris Jobke
2791b8f00d Revert "occ web executor (#24957)"
This reverts commit 854352d9a0.
2016-07-07 12:14:45 +02:00
Thomas Pulzer
90b7f74da7 Changed name of default logfile from owncloud.log to nextcloud.log. 2016-07-04 11:50:32 +02:00
VicDeo
854352d9a0 occ web executor (#24957)
* Initial web executor

* Fix PHPDoc

Fix broken integration test

OccControllerTests do not require database access - moch them all!

Kill unused sprintf
2016-06-22 13:12:36 +02:00
Thomas Müller
232d735893
Do not leak the login name - fixes #25047 2016-06-09 16:44:31 +02:00
Vincent Petry
7dcc47dc94 Merge pull request #25011 from owncloud/issue-24745-allow-to-cancel-2fa
Allow to cancel 2FA after login
2016-06-08 10:27:21 +02:00
Joas Schilling
3e3b326c85
Allow to cancel 2FA after login 2016-06-07 18:17:29 +02:00
Christoph Wurst
8f7a4aaa4d
do not generate device token if 2FA is enable for user 2016-06-07 09:09:51 +02:00
Christoph Wurst
5e71d23ded
remember redirect_url when solving the 2FA challenge 2016-06-01 14:43:47 +02:00
Vincent Petry
7f20203006 Merge pull request #24836 from owncloud/auth-tests-to-psr4
Move parallel merged auth tests to PSR-4
2016-05-25 15:15:19 +02:00
Joas Schilling
8afbd80328
Move parallel merged auth tests to PSR-4 2016-05-25 12:02:05 +02:00
Vincent Petry
25e6026fa6 Merge pull request #24735 from juliushaertl/passwordreset-invalid
Show error messages if a password reset link is invalid or expired
2016-05-25 11:08:46 +02:00
Christoph Wurst
ad10485cec
when generating browser/device token, save the login name for later password checks 2016-05-24 11:49:15 +02:00
Julius Haertl
d065980814 Add more tests for OC\Core\Controller\LostController
- remove testResetFormUnsuccessful as it is now splitted up in different test cases
- add testResetFormInvalidToken to check if timestamp and token are present
- add testResetFormInvalidTokenMatch to check if the saved token matches the provided
- add testResetFormExpiredToken to check if expiration detection works
- add testResetFormValidToken to check if detection of valid tokens works
2016-05-23 16:48:10 +02:00
Christoph Wurst
dfb4d426c2
Add two factor auth to core 2016-05-23 11:21:10 +02:00
Joas Schilling
392bc0c6b9
Move tests/core/ to PSR-4 2016-05-19 11:18:25 +02:00