Merge remote-tracking branch 'remotes/from/ce/release/2.x.x' into release/2.x.x
Some checks are pending
build / setup (push) Waiting to run
build / Check ce/* Pull Requests (push) Blocked by required conditions
build / ui (push) Blocked by required conditions
build / artifacts-ce (push) Blocked by required conditions
build / artifacts-ent (push) Blocked by required conditions
build / hcp-setup (push) Waiting to run
build / hcp-image (push) Blocked by required conditions
build / test (push) Blocked by required conditions
build / test-hcp-image (push) Blocked by required conditions
build / completed-successfully (push) Blocked by required conditions
CI / setup (push) Waiting to run
CI / Run Autopilot upgrade tool (push) Blocked by required conditions
CI / Run Go tests (push) Blocked by required conditions
CI / Run Go tests tagged with testonly (push) Blocked by required conditions
CI / Run Go tests with data race detection (push) Blocked by required conditions
CI / Run Go tests with FIPS configuration (push) Blocked by required conditions
CI / Test UI (push) Blocked by required conditions
CI / tests-completed (push) Blocked by required conditions
Run linters / Setup (push) Waiting to run
Run linters / Deprecated functions (push) Blocked by required conditions
Run linters / Code checks (push) Blocked by required conditions
Run linters / Protobuf generate delta (push) Blocked by required conditions
Run linters / Format (push) Blocked by required conditions
Run linters / Semgrep (push) Waiting to run
Check Copywrite Headers / copywrite (push) Waiting to run

This commit is contained in:
hc-github-team-secure-vault-core 2026-05-13 21:29:53 +00:00
commit bba1b1772a
2 changed files with 6 additions and 3 deletions

3
changelog/_14778.txt Normal file
View file

@ -0,0 +1,3 @@
```release-note:bug
core: Fix failure to detect errors during storage writes of totp keys.
```

View file

@ -1097,13 +1097,13 @@ func (c *Core) PersistTOTPKey(ctx context.Context, methodID, entityID, key strin
}
val, err := jsonutil.EncodeJSON(ks)
if err != nil {
return err
return fmt.Errorf("error encoding TOTP key: %w", err)
}
if c.barrier.Put(ctx, &logical.StorageEntry{
if err := c.barrier.Put(ctx, &logical.StorageEntry{
Key: fmt.Sprintf("%s%s/%s", mfaTOTPKeysPrefix, methodID, entityID),
Value: val,
}); err != nil {
return err
return fmt.Errorf("error persisting TOTP key to storage: %w", err)
}
return nil
}