From 99af7d32d42d7b77bae4f7747c02db959f35d668 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 11 Feb 2014 16:05:37 +0100 Subject: fix XSS when importing articles, speed up update and adding of feeds by only purifying content that will be added to the db --- tests/unit/fetcher/FeedFetcherTest.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tests/unit/fetcher') diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php index da7348fc9..b4ec42e60 100644 --- a/tests/unit/fetcher/FeedFetcherTest.php +++ b/tests/unit/fetcher/FeedFetcherTest.php @@ -81,7 +81,6 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { '\OCA\AppFramework\Utility\FaviconFetcher') ->disableOriginalConstructor() ->getMock(); - $this->purifier = $this->getMock('purifier', array('purify')); $this->time = 2323; $timeFactory = $this->getMockBuilder( '\OCA\AppFramework\Utility\TimeFactory') @@ -99,8 +98,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { $timeFactory, $this->cacheDirectory, $this->cacheDuration, - $this->fetchTimeout, - $this->purifier); + $this->fetchTimeout); $this->url = 'http://tests'; $this->permalink = 'http://permalink'; @@ -177,10 +175,6 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { private function createItem($author=false, $enclosureType=null, $noPubDate=false) { - $this->purifier->expects($this->once()) - ->method('purify') - ->with($this->equalTo($this->body)) - ->will($this->returnValue($this->body)); $this->expectItem('get_permalink', $this->permalink); $this->expectItem('get_title', $this->title); $this->expectItem('get_id', $this->guid); -- cgit v1.2.3