Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix# 1982: Loading YAML Safely #1983

Merged
merged 5 commits into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/challenges/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def create_challenge_using_zip_file(request, challenge_host_team_pk):

try:
with open(join(BASE_LOCATION, unique_folder_name, yaml_file), "r") as stream:
yaml_file_data = yaml.load(stream)
yaml_file_data = yaml.safe_load(stream)
except (yaml.YAMLError, ScannerError) as exc:
message = 'Error in creating challenge. Please check the yaml configuration!'
response_data = {
Expand Down
2 changes: 1 addition & 1 deletion requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ pika==0.10.0
pickleshare==0.7.4
Pillow==3.4.2
psycopg2==2.7.3.2
PyYaml==3.12
PyYaml==4.2b1
proc==0.10.1
rstr==2.2.5