From bb551abcde1926833221fbe5e55887b6d1d296bd Mon Sep 17 00:00:00 2001 From: Wolfgang Klinger <wolfgang@wazum.com> Date: Mon, 7 Aug 2017 08:30:26 +0200 Subject: [PATCH] [BUGFIX] Filter http/verify option for guzzle to boolean guzzle expects a real boolean value. This fix filters the given verify option to either the boolean equivalent or leaves any other string (path to certificate) as is. Resolves: #78729 Releases: master Change-Id: I3cc74692303e74b724683e54edad10ecb37e75c7 Reviewed-on: https://review.typo3.org/53648 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Joerg Boesche <typo3@joergboesche.de> Tested-by: Joerg Boesche <typo3@joergboesche.de> Reviewed-by: Andreas Fernandez <typo3@scripting-base.de> Reviewed-by: Jan Helke <typo3@helke.de> Reviewed-by: Markus Sommer <markus.sommer@typo3.org> Reviewed-by: Henning Liebe <h.liebe@neusta.de> Tested-by: Henning Liebe <h.liebe@neusta.de> Reviewed-by: Steffen Frese <steffenf14@gmail.com> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org> --- typo3/sysext/core/Classes/Http/RequestFactory.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/typo3/sysext/core/Classes/Http/RequestFactory.php b/typo3/sysext/core/Classes/Http/RequestFactory.php index b7a8e1980604..5bfe1975062c 100644 --- a/typo3/sysext/core/Classes/Http/RequestFactory.php +++ b/typo3/sysext/core/Classes/Http/RequestFactory.php @@ -45,6 +45,9 @@ class RequestFactory */ protected function getClient(): ClientInterface { - return GeneralUtility::makeInstance(Client::class, $GLOBALS['TYPO3_CONF_VARS']['HTTP']); + $httpOptions = $GLOBALS['TYPO3_CONF_VARS']['HTTP']; + $httpOptions['verify'] = filter_var($httpOptions['verify'], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) ?? $httpOptions['verify']; + + return GeneralUtility::makeInstance(Client::class, $httpOptions); } } -- GitLab