Nous avons procédé ce jeudi matin 08 avril 2021 à une MAJ de sécurité urgente. Nous sommes passé de la version 13.9.3 à la version 13.9.5 les releases notes correspondantes sont ici:
https://about.gitlab.com/releases/2021/03/17/security-release-gitlab-13-9-4-released/
https://about.gitlab.com/releases/2021/03/31/security-release-gitlab-13-10-1-released/

Commit 223524d5 authored by Mikaël Salson's avatar Mikaël Salson Committed by Vidjil Team

vidjil_utils: extract_fields_from_json: make sure the value exists before accessing it.

parent 837e80fc
......@@ -175,10 +175,11 @@ def extract_fields_from_json(json_fields, pos_in_list, filename):
matched_keys = {}
for field in json_fields:
value = extract_value_from_json_path(json_fields[field], json_dict)
if not isinstance(value, basestring):
matched_keys[field] = value[pos_in_list]
else:
matched_keys[field] = value
if value is not None:
if not isinstance(value, basestring) and len(value) > pos_in_list:
matched_keys[field] = value[pos_in_list]
else:
matched_keys[field] = value
return matched_keys
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment