summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2015-02-12 11:38:35 +0100
committerBjörn Schießle <bjoern@schiessle.org>2015-02-12 11:38:35 +0100
commit780024e25217db167761dc723c5100a5f144a768 (patch)
tree611b3d86690065a78c4f24e26b0d25bcdba3321f
parentb68c376e8e4087d25f7df1d6c05e60c37b06497a (diff)
parent415525237982c54caa58be622a8070b544f81796 (diff)
downloadnextcloud-server-780024e25217db167761dc723c5100a5f144a768.tar.gz
nextcloud-server-780024e25217db167761dc723c5100a5f144a768.zip
Merge pull request #14071 from owncloud/add_timeout_for_post_requests
add timeout to curl request
-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);
}