Skip to content
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

Bug: After updating to latest release send email otp fails to load and cannot login, had to disable OTP via cli to login as a workaround #9724

Open
1 task done
www-jedi opened this issue May 2, 2024 · 6 comments
Labels
needs triage This issue has been automatically labelled and needs further triage

Comments

@www-jedi
Copy link

www-jedi commented May 2, 2024

Actual behavior

When logging in with a redirect to https://<MISP_INSTANCE>/users/email_otp is currently unable to handle this request.
HTTP ERROR 500

Expected behavior

I expect MISP to send an email for OTP.

Steps to reproduce

Login with username and password then login with OTP code.

I had to disable OTP to login to MISP.

sudo -u www-data /var/www/MISP/app/Console/cake admin setSetting Security.email_otp_enabled false

Version

2.4.191 Hotfix

Operating System

Ubuntu

Operating System version

20.04

PHP version

7.4

Browser

No response

Browser version

No response

Relevant log output

2024-05-02 10:32:36 Error: [TypeError] Argument 1 passed to ACLComponent::{closure}() must be of the type array, null given, called in /datadisk/MISP/var/www/MISP/app/Controller/Component/ACLComponent.php on line 1324
Request URL: /users/email_otp
Stack Trace:
#0 /datadisk/MISP/var/www/MISP/app/Controller/Component/ACLComponent.php(1324): ACLComponent->{closure}()
#1 /datadisk/MISP/var/www/MISP/app/Controller/AppController.php(366): ACLComponent->checkAccess()
#2 /datadisk/MISP/var/www/MISP/app/Controller/UsersController.php(29): AppController->beforeFilter()
#3 /datadisk/MISP/var/www/MISP/app/Lib/Tools/BetterCakeEventManager.php(23): UsersController->beforeFilter()
#4 /datadisk/MISP/var/www/MISP/app/Lib/cakephp/lib/Cake/Controller/Controller.php(682): BetterCakeEventManager->dispatch()
#5 /datadisk/MISP/var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
#6 /datadisk/MISP/var/www/MISP/app/Lib/cakephp/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke()
#7 /datadisk/MISP/var/www/MISP/app/webroot/index.php(101): Dispatcher->dispatch()
#8 {main}
2024-05-02 10:32:36 Error: Fatal Error (1): Uncaught TypeError: Argument 1 passed to ACLComponent::{closure}() must be of the type array, null given, called in /datadisk/MISP/var/www/MISP/app/Controller/Component/ACLComponent.php on line 1324 and defined in /datadisk/MISP/var/www/MISP/app/Controller/Component/ACLComponent.php:928
Stack trace:
#0 /datadisk/MISP/var/www/MISP/app/Controller/Component/ACLComponent.php(1324): ACLComponent->{closure}()
#1 /datadisk/MISP/var/www/MISP/app/Controller/AppController.php(366): ACLComponent->checkAccess()
#2 /datadisk/MISP/var/www/MISP/app/Lib/Tools/BetterCakeEventManager.php(23): AppController->beforeFilter()
#3 /datadisk/MISP/var/www/MISP/app/Lib/cakephp/lib/Cake/Controller/Controller.php(682): BetterCakeEventManager->dispatch()
#4 /datadisk/MISP/var/www/MISP/app/Lib/cakephp/lib/Cake/Error/ExceptionRenderer.php(158): Controller->startupProcess()
#5 /datadisk/MISP/var/www/MISP/app/Lib/cakephp/lib/Cake/Error/ExceptionRenderer.php(95): ExceptionRenderer->_getController()
#6 /datadisk/MISP/var/www/MISP/app/Lib/cakeph in [/datadisk/MISP/var/www/MISP/app/Controller/Component/ACLComponent.php, line 928]
2024-05-02 10:32:36 Error: [InternalErrorException] Internal Server Error
Request URL: /users/email_otp
Stack Trace:
#0 /datadisk/MISP/var/www/MISP/app/Lib/cakephp/lib/Cake/Error/ErrorHandler.php(212): ErrorHandler::handleFatalError()
#1 /datadisk/MISP/var/www/MISP/app/Lib/cakephp/lib/Cake/Core/App.php(970): ErrorHandler::handleError()
#2 /datadisk/MISP/var/www/MISP/app/Lib/cakephp/lib/Cake/Core/App.php(943): App::_checkFatalError()
#3 [internal function]: App::shutdown()
#4 {main}

Extra attachments

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@www-jedi www-jedi added the needs triage This issue has been automatically labelled and needs further triage label May 2, 2024
@iglocska
Copy link
Member

iglocska commented May 2, 2024

Woah, haven't seen that one before. Will test this tomorrow if 192 is still affected.

@elvidence
Copy link

elvidence commented May 3, 2024

Confirming the issue with all OTP, not just email OTP.

@elvidence
Copy link

elvidence commented May 3, 2024

Woah, haven't seen that one before. Will test this tomorrow if 192 is still affected.

I am on v2.4.192 and had to disable OTP this morning. So, it is affected, at least my instance.
[Update] fixed now. Thanks to [iglocska].

@www-jedi
Copy link
Author

www-jedi commented May 6, 2024

@elvidence What is the fix?

@iglocska
Copy link
Member

iglocska commented May 7, 2024

It should be fixed if you git pull!

@www-jedi
Copy link
Author

www-jedi commented May 7, 2024

@iglocska Thank you. I can confirm I do receive OTP via email. In the event this happens ago with a different problem, how do I roll back via git to previous release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has been automatically labelled and needs further triage
Projects
None yet
Development

No branches or pull requests

3 participants