Commit Graph

286 Commits (stable28)

Author SHA1 Message Date
Julius Härtl 7f9b44d6a5 fix: Ignore preview requests for invalid file ids
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-07-25 17:40:12 +07:00
Benjamin Gaussorgues 8df095f368 feat: don't count failed CSRF as failed login attempt
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-07-11 14:27:08 +07:00
Daniel Kesselberg 01a6c9119e test: add tests for ProfilePageController
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-06-12 19:35:45 +07:00
skjnldsv f1f2f5ca98 fix(files_sharing): dark avatar support
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-06-12 13:30:16 +07:00
Eduardo Morales 3d9ed5e469 chore: update logincontroller tests
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
2024-03-11 10:30:20 +07:00
Joas Schilling 3decdd9b19 fix(tests): Fix remaining tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-02-22 08:41:26 +07:00
Louis Chemineau c1ef86cbdd Fix tests after slow logout fix
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-22 08:41:26 +07:00
Gaspard d'Hautefeuille 7418c3e1f4 Cancel PR #37405, remove regression code
Signed-off-by: Gaspard d'Hautefeuille <github@dhautefeuille.eu>
2024-02-22 08:41:26 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Ferdinand Thiessen 154a9989a7
Merge pull request #39852 from nextcloud/pragmaHeader
Stop sending deprecated Pragma header
2023-10-18 03:30:21 +07:00
Côme Chilliet ee39a47e84
Fix Dynamic property timeFactory in ClientFlowLoginControllerTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-10-09 10:30:54 +07:00
Julien Veyssier 807f173dec
make oauth2 authorization code expire after 10 minutes
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-10-05 14:24:02 +07:00
Joas Schilling 25309bcb45
techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-28 15:50:45 +07:00
Git'Fellow 066f6ef16c Stop sending deprecated Pragma header
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-08-28 15:11:22 +07:00
John Molakvoæ 266fb31180
fix(tests): preview phpunit
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-08-17 18:58:21 +07:00
jld3103 1be836273d
core: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-13 07:24:15 +07:00
Joas Schilling 33385d7ecb
fix(tests): Adjust unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-05-15 16:12:14 +07:00
Joshua Trees a4032a3800 Add some tests for input trimming in LostController.php
Signed-off-by: Joshua Trees <me@jtrees.io>
2023-04-05 12:15:38 +07:00
Git'Fellow 346054f854
Fix tests
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-03-28 09:41:04 +07:00
Joas Schilling 59578817f5
Merge pull request #36489 from nextcloud/bugfix/noid/brute-force-protection-password-reset
Add bruteforce protection to password reset page
2023-02-06 22:12:25 +07:00
Joas Schilling 875e6cf7e6
fix(CI): Adjust expected result
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-02-06 11:26:38 +07:00
Christoph Wurst 88d116ba84
fix(client-login-flow): Handle missing stateToken gracefully
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-02-06 09:42:15 +07:00
Côme Chilliet 003cc2b45a
Fix tests failures (number of calls differed with last rebase)
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-24 09:38:20 +07:00
Carl Schwan a23cd7b961
Fix a bunch of deprecation in the phpunit for core
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-01-24 09:34:09 +07:00
Côme Chilliet f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Christoph Wurst 20fcfb5739
feat(app framework)!: Inject services into controller methods
Usually Nextcloud DI goes through constructor injection. This has the
implication that each instance of a class builds the full DI tree. That
is the injected services, their services, etc. Occasionally there is a
service that is only needed for one controller method. Then the DI tree
is build regardless if used or not.

If services are injected into the method, we only build the DI tree if
that method gets executed.

This is also how Laravel allows injection.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-01-18 14:00:38 +07:00
Christoph Wurst f22101d421
Fix login loop if login CSRF fails and user is not logged in
If CSRF fails but the user is logged in that they probably logged in in
another tab. This is fine. We can just redirect.
If CSRF fails and the user is also not logged in then something is
fishy. E.g. because Nextcloud contantly regenrates the session and the
CSRF token and the user is stuck in an endless login loop.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-01-18 09:39:17 +07:00
Christoph Wurst 138deec333
chore: Make the LoginController strict
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-12-15 10:52:28 +07:00
Julius Härtl 8629d8e44f
Check share attributes on preview endpoints
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-25 11:35:31 +07:00
Côme Chilliet 1cb0c2ac52 Fix LostController test
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-18 14:49:02 +07:00
Joas Schilling 67ecd72972
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-08-31 20:54:39 +07:00
Arthur Schiwon b3b6f2d581
fix Controller tests
- added pageTitle in code was missing in expectations
- fixed warnings of superflouos parameter
- fixed wrong type of mock

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-07-22 22:15:41 +07:00
Thomas Citharel abe5ff3654
Make LostController use IInitialState and LoggerInterface
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-06-10 16:41:41 +07:00
Thomas Citharel 6283d14fa6
Modernize the LostControllerTest test
Remove some depreciated at() calls

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-06-10 16:41:41 +07:00
Thomas Citharel 44e13848a1
Add password reset typed events
These hooks are only used in the Encryption app from what I can see.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-06-10 16:41:41 +07:00
Carl Schwan b70c6a128f Update core to PHP 7.4 standard
- Typed properties
- Port to LoggerInterface

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-20 22:18:06 +07:00
Joas Schilling 6084d691b0
Merge pull request #32375 from nextcloud/bugfix/noid/show-user-account-on-grant-loginflow-step
Show user account on grant loginflow step
2022-05-16 11:18:22 +07:00
Joas Schilling 40b9769d4d
Extend tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-16 10:33:30 +07:00
Thomas Citharel 232322fe06
Modernize contacts menu
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-12 18:31:59 +07:00
John Molakvoæ 3c6253f965
Remove old legacy SvgController and IconsCacher
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-05-10 23:24:07 +07:00
Louis Chemineau 8a2cf5bb68 Do not dispatch postSetPassword when setPassword fails
Also Improve error message when setPassword fails

Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-05-05 17:21:23 +07:00
Joas Schilling 6e4d721278
Expose shareWithDisplayNameUnique also on autocomplete endpoint
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-03 12:51:23 +07:00
Vincent Petry 80388663af Add direct arg to login flow
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-Authored-by: Carl Schwan <carl@carlschwan.eu>
2022-03-28 10:28:45 +07:00
Joas Schilling 6dd60b6d30
Only allow avatars in 64 and 512 pixel size
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-07 16:47:51 +07:00
Julius Härtl 61dd1d3d97
Pass username prefill through unauthenticated request redirects
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-12-29 11:52:31 +07:00
Côme Chilliet 8b271b8a12
Fix tests and avoid PHP errors in them
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:29:01 +07:00
Joas Schilling f8463e1fc6
Fix missing import of ILogger
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-02 16:47:16 +07:00
Vitor Mattos d613b32045
add check isFairUseOfFreePushService on login
Signed-off-by: Vitor Mattos <vitor@php.rio>
2021-10-23 00:54:50 +07:00
Julius Härtl d68f028251
Merge pull request #27733 from PhrozenByte/enhancement/noid/IURLGenerator-linkToDefaultPageUrl 2021-10-05 13:06:59 +07:00
Arthur Schiwon 6857136f06
fixes missing prefix to validate password reset token
- also fixes the test which missed asserting the presence of it

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-10 19:06:50 +07:00