Skip to content

Commit

Permalink
fix: ExecCredential doesn't fail with unsupported command output
Browse files Browse the repository at this point in the history
  • Loading branch information
manusa committed Jan 8, 2024
1 parent 1a1a9f5 commit 315f486
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
### 6.10-SNAPSHOT

#### Bugs

* Fix #5580: [java-generator] Correctly handle defaults for IntOrString types
* Fix #5584: Fix CRD generation when EnumMap is used
* Fix #5626: Prevent memory accumulation from informer usage
* Fix #5527: Unable to transfer file to pod if `/tmp` is read-only
* Fix #5656: Enable EC private key usage for mTLS auth
* Fix #5694: ExecCredential doesn't fail with unsupported command output

#### Improvements
* Fix #5429: moved crd generator annotations to generator-annotations instead of crd-generator-api. Using generator-annotations introduces no transitive dependencies.
* Fix #5535: Add lombok and sundrio dependencies to the generated bom

#### Dependency Upgrade
* Updated okio to version 1.17.6 to avoid CVE-2023-3635

#### New Features
* Fix #5608 Support authentication with certificate in exec-credentials

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,11 +823,15 @@ protected static ExecCredential getExecCredentialFromExecConfig(ExecConfig exec,
if (p.waitFor() != 0) {
LOGGER.warn(output);
}
ExecCredential ec = Serialization.unmarshal(output, ExecCredential.class);
if (!apiVersion.equals(ec.apiVersion)) {
LOGGER.warn("Wrong apiVersion {} vs. {}", ec.apiVersion, apiVersion);
} else {
return ec;
try {
ExecCredential ec = Serialization.unmarshal(output, ExecCredential.class);
if (!apiVersion.equals(ec.apiVersion)) {
LOGGER.warn("Wrong apiVersion {} vs. {}", ec.apiVersion, apiVersion);
} else {
return ec;
}
} catch (Exception ex) {
LOGGER.warn("Error unmarshalling ExecCredential", ex);
}
return null;
}
Expand Down

0 comments on commit 315f486

Please sign in to comment.