Refactor code to use 'any' type and improve context handling
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
4
main.go
4
main.go
@@ -449,8 +449,8 @@ func resolveVcenterPassword(logger *slog.Logger, cipher *secrets.Secrets, legacy
|
||||
}
|
||||
|
||||
// New format: explicit prefix so we can distinguish ciphertext from plaintext safely.
|
||||
if strings.HasPrefix(raw, encryptedVcenterPasswordPrefix) {
|
||||
enc := strings.TrimPrefix(raw, encryptedVcenterPasswordPrefix)
|
||||
if after, ok := strings.CutPrefix(raw, encryptedVcenterPasswordPrefix); ok {
|
||||
enc := after
|
||||
pass, usedLegacyKey, err := decryptVcenterPasswordWithFallback(logger, cipher, legacyDecryptKeys, enc)
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("prefixed password decrypt failed: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user