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

CRM-20171: Use loadXML() instead of load() for reading xml files. #10264

Merged
merged 2 commits into from
May 4, 2017

Conversation

jitendrapurohit
Copy link
Contributor

@jitendrapurohit jitendrapurohit commented Apr 27, 2017

Avoid warnings while loading xml files. To make sure security of XXE attacks, restored the previous value at each modification in the file.

@jitendrapurohit jitendrapurohit changed the title CRM-20171: avoid warning while loading external entity CRM-20171: Use loadXML() instead of load() for reading xml files. May 2, 2017
@eileenmcnaughton
Copy link
Contributor

test fails are real :-(

@jitendrapurohit
Copy link
Contributor Author

jitendrapurohit commented May 3, 2017

When using loadXML(), the documentURI property is set to base directory instead of current file path which is why the xinclude() fails as the parser will not know where to find the files to include.

More about this - http://php.net/manual/en/domdocument.xinclude.php#76372. I've updated the PR with the fix, should pass the build now.

@colemanw colemanw merged commit bbf0d15 into civicrm:master May 4, 2017
@jitendrapurohit jitendrapurohit deleted the CRM-20171 branch May 4, 2017 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants