Pablo Zimdahl
7492f7c7cb
fix(federation): always set server status to OK after successful runs
...
Previously if a server status got set to failure, it stayed that way
until an addressbook-sync found changes. Now the server status is set to
OK after each successful sync check (if that's not the case already),
regardless of addressbook changes.
This change also includes two new logging statements, which could help
next time someone debugs this.
Signed-off-by: Pablo Zimdahl <pablo@nextcloud.com>
2024-08-22 19:01:42 +02:00
Andy Scherzinger
5b7dcc1427
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-29 08:58:16 +02:00
Arthur Schiwon
faf6a65e07
fix(federation): give some time to prepare both servers
...
- when this background job runs, while the current server was not being
added as trusted_server in the other instance, yet, the secret sharing
would not be attempted again, without visual feedback.
- the change allows 5 attempts, which gives more than 20minutes to
complete. More do not really help as the endpoint is brute force
protected.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-04-11 10:49:46 +02:00
Joas Schilling
2dfaf7614d
fix: Add bruteforce protection to federation endpoint
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-02-21 09:18:36 +01:00
Côme Chilliet
303e2febc7
Merge pull request #43387 from nextcloud/fix/migrate-away-from-ilogger-in-jobs
2024-02-08 18:27:44 +01:00
Louis Chemineau
898df41de9
Revert "Merge branch 'master' of github.com:nextcloud/server"
...
This reverts commit d9d60238c7
, reversing
changes made to ba3fdb0cdc
.
2024-02-08 15:31:19 +01:00
Côme Chilliet
b105603fd1
chore: Remove last uses of IJob::execute method
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-08 10:28:29 +01: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 +01:00
Côme Chilliet
0a9371f99f
Migrate applications away from deprecated ILogger
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-09-21 11:57:21 +02:00
Côme Chilliet
d34662f1a3
Migrate federation application to LoggerInterface
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-06-26 17:20:08 +02:00
blizzz
e714524267
Merge pull request #33104 from nextcloud/enhancement/add-logging-federation
...
Federation - add logging, update the server status if sync fails
2022-10-01 21:53:55 +02:00
Carl Schwan
48d9c4d2b0
Port existing server code to new interface
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-08 17:03:19 +02:00
Anna Larch
2988efeb7f
Add logging to federation
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-07-27 15:00:38 +00:00
Carl Schwan
f38e060090
Fix many issues with the tests
...
- Return type were not correct
- willReturn and with confusion
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-28 11:26:30 +02:00
Carl Schwan
6114176b71
Cleanup CardDav SyncService
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-24 20:25:38 +02:00
Carl Schwan
a9cfa72d1c
Summer cleanup of the federation app
...
- Use IEventDispatcher instead of deprecated symfony dispatcher
- Use LoggerInterface where possible
- Use php 7.4 properties
- Add type hinting where possible
- Move federation hooks to a seperate listener
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-24 15:39:52 +02:00
Carl Schwan
719dbafd13
Add support for Delegation Settings for more apps
...
* This adds support for the sharing, groupware, theming and user_ldap
app
* This adds some code who disapeared during a rebase in the initial
delegation PR (provisioning_api)
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-10-15 18:41:00 +02:00
Gary Kim
b78f3a57d1
Migrate HintException to OCP
...
Signed-off-by: Gary Kim <gary@garykim.dev>
2021-06-30 15:28:02 -04:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Joas Schilling
1029abc8f6
More cleaning after auto-add removal
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 08:13:47 +02:00
Christoph Wurst
1e0eaa25d0
Drop all dead packages
...
Apparently we have plenty of leftover of previous sub-dependencies.
Composer automatically dumps those with any future dependency update, so
I'm dropping them in an atomic step.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-23 09:11:23 +01:00
Joas Schilling
8027dcbc6f
Don't leave cursors open when tests fail
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 12:28:17 +01:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +02:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
...
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma
924b3298cf
TO REVERT LATER: disable some DbHandlerTest
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:28 +01:00
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +01:00
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +01:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
...
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Roeland Jago Douma
372f3d2a60
Remove deprecated functions from SecureRandom
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-12-07 19:33:32 +01:00
Bjoern Schiessle
0e0cfa0fa1
improve error reporting and move format parameter to the options
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-04-25 13:53:56 +02:00
Morris Jobke
2a38605545
Properly log the full exception instead of only the message
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-23 10:57:21 +01:00
Roeland Jago Douma
2c2e1c4c7a
Catch the errors related to untrusted self signed certificates for federation
...
* Added tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-11 18:14:01 +01:00
Roeland Jago Douma
d24b6866b1
Actually set the status so we don't cause another exception
...
* And add tests so I don't mess up again
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-11-29 16:37:54 +01:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Roeland Jago Douma
bc54e6ff7c
Use ITimeFactory
...
* Inject the timefacotry so we can mock it properly in the tests.
* Extended unit tests to cover the new paths
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-01 11:23:40 +02:00
Bjoern Schiessle
3ffff08819
we don't need to remove the job manually here, even if we ask once more the other server will decline and the background job will be removed
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-01 10:07:53 +02:00
Bjoern Schiessle
80c08e8fd0
update unit tests
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-01 10:07:53 +02:00
Bjoern Schiessle
06b9e58081
expire requestSharedSecret job after 30 days
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-01 10:07:53 +02:00
Bjoern Schiessle
51d85eb2f8
expire getShareadSecret job after 30 days
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-01 10:07:51 +02:00
Bjoern Schiessle
821e287805
adjust existing tests
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-11 15:04:01 +02:00
Bjoern Schiessle
4531b4a81d
only execute code if exception was thrown by the corresponding controller
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-03-24 11:06:44 +01:00
Bjoern Schiessle
7df5c5db2d
don't add server automatically to trusted server
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-17 18:08:45 +01:00
Roeland Jago Douma
62485ed08f
Fix deprecated getMock call in Federation app
2016-08-31 20:54:17 +02:00