Skip to content

Commit

Permalink
Use yaml.safe_load when reading a poll batch file
Browse files Browse the repository at this point in the history
  • Loading branch information
Erethon authored and vinilios committed Jan 25, 2018
1 parent 6ddf87e commit 9d53c89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zeus/views/poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def _handle_batch(election, polls, vars, auto_link=False):
def _add_batch(request, election):
batch_file = request.FILES['batch_file']
try:
data = yaml.load(batch_file)
data = yaml.safe_load(batch_file)
except Exception:
messages.error(request, _("Invalid batch file contents"))
url = election_reverse(election, 'polls_list')
Expand Down

0 comments on commit 9d53c89

Please sign in to comment.