-
-
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
Allow "TwoFactor Nextcloud Notifications" to pull the state of the 2FA again #29056
Allow "TwoFactor Nextcloud Notifications" to pull the state of the 2FA again #29056
Conversation
/backport to stable22 |
/backport to stable21 |
…A again Signed-off-by: Joas Schilling <coding@schilljs.com>
35c115d
to
3710eca
Compare
/backport to stable20 |
if ($controller instanceof APIController && $methodName === 'poll') { | ||
// Allow polling the twofactor nextcloud notifications state | ||
return; | ||
} |
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.
Does this work if the app is not locally installed? - If yes: LGTM.
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.
afaik doing instanceof
with a non existing class gracefully returns false
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.
Yes it works, same as ::class (which is what this uses internally I guess)
The backport to stable21 failed. Please do this backport manually. |
The backport to stable20 failed. Please do this backport manually. |
@@ -82,6 +83,11 @@ public function __construct(Manager $twoFactorManager, Session $userSession, ISe | |||
* @param string $methodName | |||
*/ | |||
public function beforeController($controller, $methodName) { | |||
if ($controller instanceof APIController && $methodName === 'poll') { |
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.
Is there a way we could have fixed this bug without introducing app-specifics into the server code base? 🤔
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 guess we could introduce another annotation which is like @PublicPageButWith(out)ExtraSteps
…A again