Skip to content
Snippets Groups Projects
Commit f9bc022c authored by Julien (jvoisin) Voisin's avatar Julien (jvoisin) Voisin
Browse files

Add defusedxml as an (optional) way to prevent XML-based attacks

Those attacks are DoS-only.
parent 72e1fda1
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,11 @@ import shutil
import tempfile
import datetime
import zipfile
import xml.etree.ElementTree as ET
from typing import Dict, Set, Pattern
try: # protect against DoS
from defusedxml import ElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
from . import abstract, parser_factory
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment