From 415525237982c54caa58be622a8070b544f81796 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 10 Feb 2015 20:34:51 +0100 Subject: [PATCH] add timeout to curl request --- lib/private/httphelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/httphelper.php b/lib/private/httphelper.php index 1f3482b351..08c35e4ae0 100644 --- a/lib/private/httphelper.php +++ b/lib/private/httphelper.php @@ -214,7 +214,8 @@ class HTTPHelper { curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, count($fields)); - curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldsString); + curl_setopt($ch, CURLOPT_POSTFIELDS, (string)$fieldsString); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); if (is_readable($certBundle)) { curl_setopt($ch, CURLOPT_CAINFO, $certBundle); }