mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-07-02 07:01:30 +00:00
fix: replace xml to defusedxml
This commit is contained in:
@@ -2,8 +2,8 @@ import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
from xml.etree import ElementTree
|
||||
from xml.sax import SAXException
|
||||
from defusedxml import ElementTree
|
||||
from defusedxml.common import DefusedXmlException
|
||||
|
||||
import win32api
|
||||
|
||||
@@ -85,7 +85,7 @@ class AppletApplication(BaseApplication):
|
||||
driver_yml_file = os.path.join(driver_yml_path, 'drivers.xml')
|
||||
try:
|
||||
self._merge_driver_xml('./config/drivers.xml', driver_yml_file)
|
||||
except (SAXException, FileNotFoundError):
|
||||
except (DefusedXmlException, FileNotFoundError):
|
||||
os.makedirs(driver_yml_path, exist_ok=True)
|
||||
shutil.copy('./config/drivers.xml', driver_yml_file)
|
||||
|
||||
|
||||
@@ -157,6 +157,7 @@ dependencies = [
|
||||
"pyhttpsig==1.3.0",
|
||||
"requests-unixsocket==0.4.1",
|
||||
"telnetlib3==4.0.2",
|
||||
"defusedxml>=0.7.1",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
|
||||
Reference in New Issue
Block a user