Merge pull request #29762 from nextcloud/revert/bcfd4ed5910d29423bfa86214a3b595fe8e92c9c

[stable22] Revert "Explicitly allow some routes without 2FA"
This commit is contained in:
blizzz 2021-11-18 13:29:42 +01:00 committed by GitHub
commit 7efa3552e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 7 deletions

View file

@ -98,7 +98,6 @@ class OCJSController extends Controller {
/**
* @NoCSRFRequired
* @NoTwoFactorRequired
* @PublicPage
*
* @return DataDisplayResponse

View file

@ -83,12 +83,6 @@ class TwoFactorMiddleware extends Middleware {
* @param string $methodName
*/
public function beforeController($controller, $methodName) {
if ($this->reflector->hasAnnotation('NoTwoFactorRequired')) {
// Route handler explicitly marked to work without finished 2FA are
// not blocked
return;
}
if ($controller instanceof APIController && $methodName === 'poll') {
// Allow polling the twofactor nextcloud notifications state
return;