mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
use defusedxml to avoid DoS attacks while loading XML
This commit is contained in:
parent
cc94ebca30
commit
4d13a904f3
4 changed files with 10 additions and 4 deletions
|
|
@ -681,6 +681,12 @@ class CommonTest(unittest.TestCase):
|
|||
sig = fdroidserver.common.metadata_find_developer_signature('org.smssecure.smssecure')
|
||||
self.assertEqual('b30bb971af0d134866e158ec748fcd553df97c150f58b0a963190bbafbeb0868', sig)
|
||||
|
||||
def test_parse_xml(self):
|
||||
manifest = os.path.join('source-files', 'fdroid', 'fdroidclient', 'AndroidManifest.xml')
|
||||
parsed = fdroidserver.common.parse_xml(manifest)
|
||||
self.assertIsNotNone(parsed)
|
||||
self.assertEqual(str(type(parsed)), "<class 'xml.etree.ElementTree.Element'>")
|
||||
|
||||
def test_parse_androidmanifests(self):
|
||||
app = fdroidserver.metadata.App()
|
||||
app.id = 'org.fdroid.fdroid'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue