makes ssh plugin resilient against invalid entries in hosts file

fixes #10238
pull/10331/merge
Brian Coca 9 years ago
parent e349004325
commit 496186f5de

@ -243,6 +243,8 @@ class Connection(ConnectionBase):
tokens = line.split() tokens = line.split()
if not tokens: if not tokens:
continue continue
if isinstance(tokens, list) and tokens: # skip invalid hostlines
if tokens[0].find(self.HASHED_KEY_MAGIC) == 0: if tokens[0].find(self.HASHED_KEY_MAGIC) == 0:
# this is a hashed known host entry # this is a hashed known host entry
try: try:

Loading…
Cancel
Save