diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-02-10 20:34:51 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-03-18 17:22:38 +0100 |
commit | c28356fffc45a2298713f0db82b9d9c8c2d14d2f (patch) | |
tree | b240ad971055176d82f04ee9182c38d5cc71035c /lib | |
parent | c9bafe5c7a2865229f2dd843b9b10eb54747b90b (diff) | |
download | nextcloud-server-c28356fffc45a2298713f0db82b9d9c8c2d14d2f.tar.gz nextcloud-server-c28356fffc45a2298713f0db82b9d9c8c2d14d2f.zip |
add timeout to curl request
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/httphelper.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/httphelper.php b/lib/private/httphelper.php index 1f3482b3514..08c35e4ae08 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); } |