From 38a018101e9e59daaa10d84b1794d780b68bd7cc Mon Sep 17 00:00:00 2001
From: Morton Jonuschat <m.jonuschat@mojocode.de>
Date: Tue, 14 Jun 2016 19:45:11 +0200
Subject: [PATCH] [BUGFIX] Linkvalidator: Fix exception when validating
 external links

Provide an instance of \GuzzleHttp\Cookie\CookieJar for the 'cookies'
option when validating an external link, the previous value of true
resulted in an exception.

Releases: master
Resolves: #76631
Change-Id: I0a9089ff1a442783b4484cf1d512adb520d95dca
Reviewed-on: https://review.typo3.org/48577
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
---
 .../sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php b/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
index 3849d3e461ad..66af0487e471 100644
--- a/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
+++ b/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Linkvalidator\Linktype;
  * The TYPO3 project - inspiring people to share!
  */
 
+use GuzzleHttp\Cookie\CookieJar;
 use GuzzleHttp\Exception\TooManyRedirectsException;
 use TYPO3\CMS\Core\Http\RequestFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -66,7 +67,7 @@ class ExternalLinktype extends AbstractLinktype
         }
 
         $options = array(
-            'cookies' => true,
+            'cookies' => GeneralUtility::makeInstance(CookieJar::class),
             'allow_redirects' => ['strict' => true]
         );
 
-- 
GitLab