-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Issue: needs updateAdditional information is require, waiting for responseAdditional information is require, waiting for responseReported on 2.4.8Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.
Description
Preconditions and environment
- Magento version 2.4.8
- Anything else that would help a developer reproduce the bug
Steps to reproduce
- Enable 2FA in Magento
- Login in Magento backend
- Stores > Permissions > All Users > Add New User
- Put only necessary data to Save User
- No Error but redirected to backend start page
Expected result
Create new Admin user.
Actual result
Got redirected to startpage with no error msg, also no logs in exception.log
Additional information
Troubleshooting in IDE:
Spin Up Debugger on Save Button, catch Exception
Magento\TwoFactorAuth\Model\UserConfigManager::getProvidersCodes(): Return value must be of type array, null returned
Set debugger on
module-two-factor-auth/Model/UserConfigManager.php
$userConfig = $this->getUserConfiguration($userId);
Sometimes get NULL from $userConfig then it crash of return type error.
Here my fix for this problem
public function getProvidersCodes(int $userId): array
{
$userConfig = $this->getUserConfiguration($userId);
//this if fixed the issue
if (!$userConfig->getData('providers')) {
return [];
}
return $userConfig->getData('providers');
}
Release note
Create new Administrator with 2FA enabled fail!
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Issue: needs updateAdditional information is require, waiting for responseAdditional information is require, waiting for responseReported on 2.4.8Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.
Type
Projects
Status
Needs Update