Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] force enabling the external XML entity loaders#18915
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedMay 30, 2016
@nicolas-grekas@sstok I don't see the security issue here. The |
sstok commentedMay 30, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Edit. OK, that's no problem as the Document is parsed before the validation takes place.
I'm confused here, is the problem still existent or does this pull request solve the issue? And as@nicolas-grekas pointed out it also needs to be done for the XliffFileLoader schema validator also as it loads at least one external resourcehttps://github.com/symfony/symfony/blob/master/src/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd#L33 (gets replaced by a local version). |
fabpot commentedJun 8, 2016
There are other calls to |
xabbuh commentedJun 9, 2016
@fabpot One place is in the XliffFileLoader which afaik doesn't support to import resources anyway (and thus would not be affected). And forcing the value in the |
xabbuh commentedJun 9, 2016
Ah no I was mistaken. The |
de5175b tod60d4e0Compare| thrownewInvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: %s',$file,implode("\n",$this->getXmlErrors($internalErrors)))); | ||
| } | ||
| libxml_disable_entity_loader($disableEntities); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
we need to restore the orig value before throwing, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Sure, good catch.
fabpot commentedJun 13, 2016
Thank you@xabbuh. |
…ty loaders (xabbuh)This PR was merged into the 2.7 branch.Discussion----------[DependencyInjection] force enabling the external XML entity loaders| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#18876,#18908| License | MIT| Doc PR |Commits-------12b5509 force enabling the external XML entity loaders
Uh oh!
There was an error while loading.Please reload this page.