Skip to content

Commit 9d53c89

Browse files
Erethonvinilios
authored andcommitted
Use yaml.safe_load when reading a poll batch file
1 parent 6ddf87e commit 9d53c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zeus/views/poll.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def _handle_batch(election, polls, vars, auto_link=False):
227227
def _add_batch(request, election):
228228
batch_file = request.FILES['batch_file']
229229
try:
230-
data = yaml.load(batch_file)
230+
data = yaml.safe_load(batch_file)
231231
except Exception:
232232
messages.error(request, _("Invalid batch file contents"))
233233
url = election_reverse(election, 'polls_list')

0 commit comments

Comments
 (0)