Protect YAML parser against empty input string
This commit is contained in:
parent
69bafeb672
commit
673aee1e7a
1 changed files with 1 additions and 0 deletions
|
|
@ -119,6 +119,7 @@ public class Password {
|
|||
}
|
||||
|
||||
private func getAdditionalFields(fromYaml: String) throws {
|
||||
guard !fromYaml.isEmpty else { return }
|
||||
let yamlFile = try Yams.load(yaml: fromYaml) as! [String: Any]
|
||||
additions.append(contentsOf: yamlFile.map { ($0, String(describing: $1)) })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue