[device/ruijie] Mitigation for security vulnerability #11779
Signed-off-by: maipbui maibui@microsoft.com Why I did it The xml.etree.ElementTree module is not secure against maliciously constructed data. How I did it Remove xml. Use lxml XML parsers package that prevent potentially malicious operation.
This commit is contained in:
parent
fb774dd46a
commit
0f4bca426e
@ -6,8 +6,8 @@
|
|||||||
* PSU
|
* PSU
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import xml.etree.ElementTree as ET
|
|
||||||
import glob
|
import glob
|
||||||
|
from lxml import etree as ET
|
||||||
|
|
||||||
MAILBOX_DIR = "/sys/bus/i2c/devices/"
|
MAILBOX_DIR = "/sys/bus/i2c/devices/"
|
||||||
PORTS_DIR = "/sys/class/net/"
|
PORTS_DIR = "/sys/class/net/"
|
||||||
|
Loading…
Reference in New Issue
Block a user