You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/18 12:37:38 UTC

[GitHub] [airflow] nsAstro commented on a diff in pull request #23043: Add exception to catch single line private keys

nsAstro commented on code in PR #23043:
URL: https://github.com/apache/airflow/pull/23043#discussion_r852089412


##########
airflow/providers/ssh/hooks/ssh.py:
##########
@@ -415,6 +415,9 @@ def _pkey_from_private_key(self, private_key: str, passphrase: Optional[str] = N
         :return: ``paramiko.PKey`` appropriate for given key
         :raises AirflowException: if key cannot be read
         """
+        if private_key.count("\n") < 2:

Review Comment:
   Good point, I've amended it accordingly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org