Skip to content

Commit 62fd1b1

Browse files
committed
add missing error check
1 parent 2f98168 commit 62fd1b1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apikey.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,11 @@ func (k *ApiKey) ReEncryptTables(oldSecret string) error {
257257
return err
258258
}
259259

260-
for _, v := range []*string{&u.EncryptedPublicKey, &u.EncryptedKeyHandle, &u.EncryptedAppId} {
261-
err = k.ReEncryptLegacy(oldKey, v)
260+
for _, p := range []*string{&u.EncryptedPublicKey, &u.EncryptedKeyHandle, &u.EncryptedAppId} {
261+
err = k.ReEncryptLegacy(oldKey, p)
262+
if err != nil {
263+
return err
264+
}
262265
}
263266

264267
err = u.Store.Store(envConfig.WebauthnTable, &u)

0 commit comments

Comments
 (0)