diff options
author | James Falcon <TheRealFalcon@users.noreply.github.com> | 2021-05-05 10:54:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 11:54:17 -0400 |
commit | f17f78fa9d28e62793a5f2c7109fc29eeffb0c89 (patch) | |
tree | 57d5ba65813dc4eaab81a45918818ed8d70b7eab /cloudinit/sources | |
parent | 5f5fa5ee99296b3b1044682c41bab38a32cdccd7 (diff) | |
download | vyos-cloud-init-f17f78fa9d28e62793a5f2c7109fc29eeffb0c89.tar.gz vyos-cloud-init-f17f78fa9d28e62793a5f2c7109fc29eeffb0c89.zip |
Add \r\n check for SSH keys in Azure (#889)
See https://bugs.launchpad.net/cloud-init/+bug/1910835
Diffstat (limited to 'cloudinit/sources')
-rwxr-xr-x | cloudinit/sources/DataSourceAzure.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index c0025c7b..2f3390c3 100755 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -1551,6 +1551,9 @@ def _key_is_openssh_formatted(key): """ Validate whether or not the key is OpenSSH-formatted. """ + # See https://bugs.launchpad.net/cloud-init/+bug/1910835 + if '\r\n' in key.strip(): + return False parser = ssh_util.AuthKeyLineParser() try: |