Skip to content

Commit

Permalink
Merge pull request #40 from mbabinski/main
Browse files Browse the repository at this point in the history
Fix: encoding issue in SigmaCollection.load_ruleset() method in collection.py
  • Loading branch information
thomaspatzke authored Mar 30, 2022
2 parents 9603509 + e54c976 commit 54d72b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sigma/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def load_ruleset(
if on_beforeload is not None: # replace path with return value of on_beforeload function if provided
path = on_beforeload(path)
if path is not None: # Skip if path is None
sigma_collection = SigmaCollection.from_yaml(path.open(), collect_errors, SigmaRuleLocation(path))
sigma_collection = SigmaCollection.from_yaml(path.open(encoding="utf-8"), collect_errors, SigmaRuleLocation(path))
if on_load is not None: # replace SigmaCollection generated from file content with the return value from on_load function if provided
sigma_collection = on_load(path, sigma_collection)
if sigma_collection is not None: # Skip if nothing
Expand Down

0 comments on commit 54d72b6

Please sign in to comment.