mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
add nil check for mfa enforcement config namespace on login (#20375)
* add nil check for mfa enforcement config ns * move nil check and add changelog
This commit is contained in:
parent
d766848664
commit
c261445f83
2 changed files with 5 additions and 1 deletions
3
changelog/20375.txt
Normal file
3
changelog/20375.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
core: prevent panic on login after namespace is deleted that had mfa enforcement
|
||||
```
|
||||
|
|
@ -1788,7 +1788,8 @@ ECONFIG_LOOP:
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to find the MFAEnforcementConfig namespace")
|
||||
}
|
||||
if eConfig == nil || (eConfigNS.ID != ns.ID && !ns.HasParent(eConfigNS)) {
|
||||
|
||||
if eConfig == nil || eConfigNS == nil || (eConfigNS.ID != ns.ID && !ns.HasParent(eConfigNS)) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue