Skip to content

Commit

Permalink
backport of commit c261445 (#20405)
Browse files Browse the repository at this point in the history
Co-authored-by: davidadeleon <56207066+davidadeleon@users.noreply.github.com>
  • Loading branch information
1 parent 8b002ba commit 0c249cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/20375.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
core: prevent panic on login after namespace is deleted that had mfa enforcement
```
3 changes: 2 additions & 1 deletion vault/login_mfa.go
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,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
}

Expand Down

0 comments on commit 0c249cb

Please sign in to comment.