Skip to content

Commit df7711f

Browse files
TheLinuxGuyCapirca Team
authored andcommitted
Use a safer LibYAML loader when parsing .yaml configuration for the CLI arguments.
PiperOrigin-RevId: 416926145
1 parent 43f8359 commit df7711f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

capirca/utils/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
def yaml_loader(filename):
2222
with open(filename, 'r') as f:
2323
try:
24-
data = yaml.load(f, Loader=yaml.CLoader)
24+
data = yaml.safe_load(f)
2525
except AttributeError:
26-
data = yaml.load(f, Loader=yaml.Loader)
26+
data = yaml.safe_load(f)
2727

2828
return data
2929

0 commit comments

Comments
 (0)