Skip to content

Commit ba82d7a

Browse files
backport of commit c261445 (hashicorp#20406)
Co-authored-by: davidadeleon <56207066+davidadeleon@users.noreply.github.com>
1 parent 0a9b224 commit ba82d7a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎changelog/20375.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
core: prevent panic on login after namespace is deleted that had mfa enforcement
3+
```

‎vault/login_mfa.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,8 @@ ECONFIG_LOOP:
17741774
if err != nil {
17751775
return nil, fmt.Errorf("failed to find the MFAEnforcementConfig namespace")
17761776
}
1777-
if eConfig == nil || (eConfigNS.ID != ns.ID && !ns.HasParent(eConfigNS)) {
1777+
1778+
if eConfig == nil || eConfigNS == nil || (eConfigNS.ID != ns.ID && !ns.HasParent(eConfigNS)) {
17781779
continue
17791780
}
17801781

0 commit comments

Comments
 (0)