Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Commit

Permalink
Merge branch 'security/zf2014-01'
Browse files Browse the repository at this point in the history
Resolves ZF2014-01 - XXE/XEE vulnerabilities
  • Loading branch information
weierophinney committed Mar 5, 2014
2 parents 3183b61 + 1fafbc4 commit 1049b71
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .gitignore
@@ -1 +1,6 @@
vendor/
composer.lock
composer.phar
vendor
.buildpath
.project
.settings/
7 changes: 4 additions & 3 deletions composer.json
Expand Up @@ -21,9 +21,10 @@
],
"require": {
"php": ">=5.3.3",
"zendframework/zend-http": ">=2.0.0",
"zendframework/zend-uri": ">=2.0.0",
"zendframework/zend-version": ">=2.0.0"
"zendframework/zend-http": "~2.0",
"zendframework/zend-uri": "~2.0",
"zendframework/zend-version": "~2.0",
"zendframework/zendxml": "~1.0-dev"
},
"extra": {
"branch-alias": {
Expand Down
3 changes: 2 additions & 1 deletion library/ZendService/Technorati/AbstractResultSet.php
Expand Up @@ -14,6 +14,7 @@
use DOMXPath;
use OutOfBoundsException;
use SeekableIterator;
use ZendXml\Security as XmlSecurity;

/**
* This is the most essential result set.
Expand Down Expand Up @@ -270,7 +271,7 @@ public function __sleep()
public function __wakeup()
{
$dom = new DOMDocument();
$dom->loadXml($this->xml);
$dom = XmlSecurity::scan($this->xml, $dom);
$this->init($dom);
$this->xml = null; // reset XML content
}
Expand Down
3 changes: 2 additions & 1 deletion tests/ZendService/Technorati/ResultSetTest.php
Expand Up @@ -10,6 +10,7 @@

namespace ZendServiceTest\Technorati;

use ZendService\Technorati\SearchResultSet;
/**
* @category Zend
* @package Zend_Service_Technorati
Expand All @@ -31,7 +32,7 @@ public function setUp()
{
$this->ref = new \ReflectionClass('ZendService\Technorati\AbstractResultSet');
$this->dom = self::getTestFileContentAsDom('TestSearchResultSet.xml');
$this->object = new Technorati\SearchResultSet($this->dom);
$this->object = new SearchResultSet($this->dom);
$this->objectRef = new \ReflectionObject($this->object);
}

Expand Down
4 changes: 3 additions & 1 deletion tests/ZendService/Technorati/ResultTest.php
Expand Up @@ -10,6 +10,8 @@

namespace ZendServiceTest\Technorati;

use ZendService\Technorati\SearchResult;

/**
* @category Zend
* @package Zend_Service_Technorati
Expand All @@ -27,7 +29,7 @@ public function setUp()
{
$this->ref = new \ReflectionClass('ZendService\Technorati\AbstractResult');
$this->domElements = self::getTestFileElementsAsDom('TestSearchResultSet.xml');
$this->object = new Technorati\SearchResult($this->domElements->item(0));
$this->object = new SearchResult($this->domElements->item(0));
$this->objectRef = new \ReflectionObject($this->object);
}

Expand Down

0 comments on commit 1049b71

Please sign in to comment.