From 98aa0f1c57c2375a81d8a63f96eef077f2e26e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Sat, 28 Jan 2017 01:38:00 +0100 Subject: [PATCH] SSL fix for getRemoteContent(). --- e107_handlers/file_class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/e107_handlers/file_class.php b/e107_handlers/file_class.php index e5bd00a84..7e722123c 100644 --- a/e107_handlers/file_class.php +++ b/e107_handlers/file_class.php @@ -581,7 +581,15 @@ class e_file if (function_exists('file_get_contents') && ini_get('allow_url_fopen')) { $old_timeout = e107_ini_set('default_socket_timeout', $timeout); - $data = file_get_contents($address); + + $context = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + ), + ); + + $data = file_get_contents($address, false, stream_context_create($context)); // $data = file_get_contents(htmlspecialchars($address)); // buggy - sometimes fails. if ($old_timeout !== FALSE)