libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Halbert (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LIBCLOUD-933) get_pubkey_comment raise IndexError: list index out of range
Date Thu, 20 Jul 2017 03:12:00 GMT
Halbert created LIBCLOUD-933:
--------------------------------

             Summary: get_pubkey_comment raise IndexError: list index out of range 
                 Key: LIBCLOUD-933
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-933
             Project: Libcloud
          Issue Type: Bug
         Environment: libcloud V2.0.0
            Reporter: Halbert


In publickey.py ln 67:
def get_pubkey_comment(pubkey, default=None):
    if pubkey.startswith("ssh-"):
        # This is probably an OpenSSH key
        return pubkey.strip().split(' ', 3)[2]
    if default:
        return default
    raise ValueError('Public key is not in a supported format')

Should be:

def get_pubkey_comment(pubkey, default=None):
    if pubkey.startswith("ssh-"):
        # This is probably an OpenSSH key
         return pubkey.strip().split(' ', 3)[1]
    if default:
        return default
    raise ValueError('Public key is not in a supported format')




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message