summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-02-10 20:34:51 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2015-02-12 10:51:39 +0100
commit415525237982c54caa58be622a8070b544f81796 (patch)
treeea2668ebfbdbde9c0b974f2a8514f7c0c9d3ea56 /lib
parent11283c57d9bba055e881293d6958ac9d6033f928 (diff)
downloadnextcloud-server-415525237982c54caa58be622a8070b544f81796.tar.gz
nextcloud-server-415525237982c54caa58be622a8070b544f81796.zip
add timeout to curl request
Diffstat (limited to 'lib')
-rw-r--r--lib/private/httphelper.php3
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);
}