Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fix: Exceptions raised in Soap/Server can leave XML entity loader disabled. #6200

Conversation

markkirchner
Copy link

  • The original libxml_disable_entity_loader() setting was not restored when an exception was raised in \Zend\Soap\Server::_setRequest().
  • This caused funny behaviour for subsequent requests which are processed by the same Apache process (also see https://bugs.php.net/bug.php?id=64938 for example).
  • Fixed by moving the libxml_disable_entity_loader() "cleanup call" a bit further up.
  • And instead of forcing entity loading to "false", the previous setting is saved and restored.
  • Added a unittest for the intended behaviour.

disabled.

- The original libxml_disable_entity_loader() setting was not restored
when an exception was raised in Server::_setRequest().
- Fixed by moving the libxml_disable_entity_loader(false) call a bit
further up.
- Added unittest for the intended behaviour.
…abled.

- Improved the fix a bit: Instead of forcing entity loading to "false",
  the previous setting is saved and restored.
- Adjusted the unittest accordingly.
@Ocramius Ocramius self-assigned this Apr 29, 2014
@Ocramius Ocramius added this to the 2.3.2 milestone Apr 29, 2014
@Ocramius Ocramius merged commit a40e770 into zendframework:master Apr 29, 2014
Ocramius added a commit that referenced this pull request Apr 29, 2014
@Ocramius
Copy link
Member

@markkirchner thanks!

@markkirchner markkirchner deleted the fix-soap-server-disabled-entity-loader branch April 29, 2014 17:24
gianarb pushed a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants