-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(federation): Allow cloud federation providers to handle unsuccess… #43884
Conversation
* @throws \Throwable When $e did not have a response | ||
* @since 29.0.0 | ||
*/ | ||
public function getResponseFromThrowable(\Throwable $e): IResponse; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added and used this method. I also put it in OCP, because it's not the first time where I find myself wanting to get the response of a "Guzzle ClientException" as an IResponse, without new \OC\…\Response()
violating private class access.
…ful return codes Otherwise they are put to retry and will immediately trigger bruteforce protection infinitely Signed-off-by: Joas Schilling <coding@schilljs.com>
3e615d0
to
ecb111c
Compare
* @throws OCMProviderException | ||
* @since 29.0.0 | ||
*/ | ||
public function sendCloudShare(ICloudFederationShare $share): IResponse; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why add two new methods when you could modify the exisitng one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it would now throw instead of returning false, which would break the current consumers?
…ful return codes
Otherwise they are put to retry and will immediately trigger bruteforce protection infinitely. This is currently easily producable when a federated user leaves a room during a "netsplit", maintenance mode or with a temporary error and afterwards people posting in the normal chat room.
Checklist