diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e7f215..3a1283f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Handle edge-case error of schedule * Handle jobs without credentials * Cleanup execution status if thread stopped +* Fix editing of credentials (*ssk-key invalid*) ---- diff --git a/src/ansibleguy-webui/aw/api_endpoints/credentials.py b/src/ansibleguy-webui/aw/api_endpoints/credentials.py index 3f0dfc8..ff3558f 100644 --- a/src/ansibleguy-webui/aw/api_endpoints/credentials.py +++ b/src/ansibleguy-webui/aw/api_endpoints/credentials.py @@ -121,6 +121,9 @@ def credentials_in_use(credentials: BaseJobCredentials) -> bool: def _validate_and_fix_ssh_key(key: str) -> (str, None): + if is_null(key): + return '' + if key.find(SSH_KEY_PREFIX) == -1: # only support unencrypted keys for now return None