mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 11:45:24 +03:00
use safeloader
This commit is contained in:
parent
9a4f970337
commit
7f362b42b7
@ -87,7 +87,8 @@ def load_config_with_no_duplicates(raw_config) -> dict:
|
|||||||
"""Get config ensuring duplicate keys are not allowed."""
|
"""Get config ensuring duplicate keys are not allowed."""
|
||||||
|
|
||||||
# https://stackoverflow.com/a/71751051
|
# https://stackoverflow.com/a/71751051
|
||||||
class PreserveDuplicatesLoader(yaml.loader.Loader):
|
# important to use SafeLoader here to avoid RCE
|
||||||
|
class PreserveDuplicatesLoader(yaml.loader.SafeLoader):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def map_constructor(loader, node, deep=False):
|
def map_constructor(loader, node, deep=False):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user