mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
swap unsafe yaml.load usage for yaml.safe_load (#2324)
Related to #2323 Recommend additionally adding a step in CI ensuring use of `yaml.load` is prevented from existing in the code base.
This commit is contained in:
@@ -504,7 +504,7 @@ class Trivia(commands.Cog):
|
||||
|
||||
with path.open(encoding="utf-8") as file:
|
||||
try:
|
||||
dict_ = yaml.load(file)
|
||||
dict_ = yaml.safe_load(file)
|
||||
except yaml.error.YAMLError as exc:
|
||||
raise InvalidListError("YAML parsing failed.") from exc
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user