DataSource: if public-keys is a string, split it on newline
Previously, we were returning an array with a single item, which could have contained newlines in it. This does limit the potential content of a ssh public key, but it seems unlikely that in the future a valid public key would contain a newline.
This commit is contained in:
parent
e43d9274be
commit
b6617485e7
@ -70,7 +70,7 @@ class DataSource:
|
||||
return([])
|
||||
|
||||
if isinstance(self.metadata['public-keys'], str):
|
||||
return([self.metadata['public-keys'], ])
|
||||
return(str(self.metadata['public-keys']).splitlines())
|
||||
|
||||
if isinstance(self.metadata['public-keys'], list):
|
||||
return(self.metadata['public-keys'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user