-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fixes #27536: Allow removing optional password fields in connection edit form #27589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
696034a
becdc82
40124af
18c8973
2afcea6
36f7eee
c883780
ecc19b7
556054a
53e3ce1
5ec7ed2
3e8999d
c55e50c
73aa83f
af6388a
badb6e1
134325c
0500c49
6ba79e3
c66ad90
2c87408
b560118
e15eb99
07e032f
3001f1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,15 @@ protected ExternalSecretsManager( | |
| @Override | ||
| protected String storeValue(String fieldName, String value, String secretId, boolean store) { | ||
| String fieldSecretId = buildSecretId(false, secretId, fieldName.toLowerCase(Locale.ROOT)); | ||
| if (Objects.isNull(value) || value.isEmpty()) { | ||
| if (store) { | ||
| try { | ||
| deleteSecretInternal(fieldSecretId); | ||
| } catch (Exception e) { | ||
| } | ||
| } | ||
|
Comment on lines
+36
to
+42
|
||
| return null; | ||
| } | ||
|
gitar-bot[bot] marked this conversation as resolved.
|
||
| // check if value does not start with 'config:' only String can have password annotation | ||
| if (Boolean.FALSE.equals(isSecret(value))) { | ||
| if (store) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
storeValueswallows all exceptions when attempting to delete a secret (empty catch block). This can silently fail secret removal while the API returns success, leaving orphaned secrets and making troubleshooting difficult. Catch and ignore only expected "not found" cases; for other errors, at least log a warning (ideally rethrow to fail the update).