Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emanegentransportxml not working with libxml2 2.7.8.dfsg-5.1ubuntu4.7 #1

Closed
sgalgano opened this issue Jun 3, 2014 · 3 comments
Closed
Assignees
Labels

Comments

@sgalgano
Copy link
Member

sgalgano commented Jun 3, 2014

Reported on mailing list by Hasnain Lakhani:

Our tests started failing on Friday. We use EMANE 0.7.4.

Debugging showed that EMANE uses external parameters entities in the XML
files; specifically the DTD links (I believe). We were getting errors on
files that worked perfectly fine previously. The errors would be of the
following form:

validity error : No declaration for element param
validity error : No declaration for attribute name of element param
validity error : No declaration for attribute value of element param

libxml2 had a security update on Thursday:

libxml2 (2.7.8.dfsg-5.1ubuntu4.7) precise-security; urgency=medium

After downgrading libxml down to 2.7.8.dfsg-5.1ubuntu4.6 we noticed that
emanegentransportxml works fine again.

This behaviour should be fixed so that it works again with the latest
libxml2. I'll be happy to provide further information if needed

@sgalgano sgalgano added the bug label Jun 3, 2014
@sgalgano sgalgano self-assigned this Jun 3, 2014
@sgalgano
Copy link
Member Author

sgalgano commented Jun 3, 2014

Issue present in 0.8.1 and 0.9.1.

The issue is related to changes in the way DTDs with external entities are handled. There is a sanity check in emanegentransportxml that validates the generated XML against the DTD. This is where the issue is occurring:

515:  my $dtdY = XML::LibXML::Dtd->new("", "$dtdPath"."$dtdFile");
516:  $document->validate($dtdY);

Now is probably a good time to replace the script with a python equivalent using lxml.etree. That has been the plan for a while. The current script is difficult to maintain and adds unnecessary perl packages to the emane installation dependencies.

@sgalgano
Copy link
Member Author

sgalgano commented Jun 3, 2014

Pull requested for merge with develop.

@sgalgano
Copy link
Member Author

sgalgano commented Jun 4, 2014

Merged into develop 848848b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant