Skip to content

Commit

Permalink
Fix #43
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Posselt committed Jun 22, 2016
1 parent 0535015 commit 588a169
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nextcloudappstore/core/api/v1/tests/data/infoxmls/entities.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!DOCTYPE author [
<!ELEMENT name (#PCDATA)>
<!ENTITY js "Jo Smith">
]>
<info>
<id>news</id>
<name>News &js;</name>
<description>An RSS/Atom feed reader</description>
<version>8.8.2</version>
<licence>agpl</licence>
<author>Bernhard Posselt</author>
<category>multimedia</category>
<dependencies>
<owncloud min-version="9.0"/>
</dependencies>
</info>
7 changes: 7 additions & 0 deletions nextcloudappstore/core/api/v1/tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ def test_broken_xml(self):
self.config.pre_info_xslt,
self.config.info_xslt)

def test_entities(self):
xml = self._get_test_xml('data/infoxmls/entities.xml')
with (self.assertRaises(InvalidAppMetadataXmlException)):
parse_app_metadata(xml, self.config.info_schema,
self.config.pre_info_xslt,
self.config.info_xslt)

def test_extract_gunzip_info(self):
path = self.get_path('data/archives/full.tar.gz')
extractor = GunZipAppMetadataExtractor(self.config)
Expand Down

0 comments on commit 588a169

Please sign in to comment.