aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_client.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-02-11 08:49:40 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-02-11 08:49:40 +0000
commit6c23b37c7f45e07fad720aa36c73091f52b459a1 (patch)
tree5684e5b9e6adf3fb198b899e728d12fc53da1e8d /src/transport/plugin_transport_http_client.c
parent97373cfa1b4d0f7e26a14f35016758a1f3b58406 (diff)
downloadgnunet-6c23b37c7f45e07fad720aa36c73091f52b459a1.tar.gz
gnunet-6c23b37c7f45e07fad720aa36c73091f52b459a1.zip
hotfix for curl vulnerability: libcurl SASL buffer overflow vulnerability CVE-2013-0249
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r--src/transport/plugin_transport_http_client.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 02d092832..351687a07 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -1237,7 +1237,15 @@ client_connect_get (struct Session *s)
1237 curl_easy_setopt (s->client_get, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); 1237 curl_easy_setopt (s->client_get, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
1238 curl_easy_setopt (s->client_get, CURLOPT_SSL_VERIFYPEER, 0); 1238 curl_easy_setopt (s->client_get, CURLOPT_SSL_VERIFYPEER, 0);
1239 curl_easy_setopt (s->client_get, CURLOPT_SSL_VERIFYHOST, 0); 1239 curl_easy_setopt (s->client_get, CURLOPT_SSL_VERIFYHOST, 0);
1240 curl_easy_setopt (s->client_get, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
1241 curl_easy_setopt (s->client_get, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS);
1242#else
1243 curl_easy_setopt (s->client_get, CURLOPT_PROTOCOLS, CURLPROTO_HTTP);
1244 curl_easy_setopt (s->client_get, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP);
1240#endif 1245#endif
1246
1247 curl_easy_setopt (s->client_get, CURLOPT_URL, s->url);
1248 curl_easy_setopt (s->client_get, CURLOPT_URL, s->url);
1241 curl_easy_setopt (s->client_get, CURLOPT_URL, s->url); 1249 curl_easy_setopt (s->client_get, CURLOPT_URL, s->url);
1242 //curl_easy_setopt (s->client_get, CURLOPT_HEADERFUNCTION, &curl_get_header_cb); 1250 //curl_easy_setopt (s->client_get, CURLOPT_HEADERFUNCTION, &curl_get_header_cb);
1243 //curl_easy_setopt (s->client_get, CURLOPT_WRITEHEADER, ps); 1251 //curl_easy_setopt (s->client_get, CURLOPT_WRITEHEADER, ps);
@@ -1256,8 +1264,6 @@ client_connect_get (struct Session *s)
1256 curl_easy_setopt (ps->recv_endpoint, CURLOPT_TCP_NODELAY, 1); 1264 curl_easy_setopt (ps->recv_endpoint, CURLOPT_TCP_NODELAY, 1);
1257#endif 1265#endif
1258 curl_easy_setopt (s->client_get, CURLOPT_FOLLOWLOCATION, 0); 1266 curl_easy_setopt (s->client_get, CURLOPT_FOLLOWLOCATION, 0);
1259 curl_easy_setopt (curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
1260 curl_easy_setopt (curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
1261 1267
1262 mret = curl_multi_add_handle (s->plugin->curl_multi_handle, s->client_get); 1268 mret = curl_multi_add_handle (s->plugin->curl_multi_handle, s->client_get);
1263 if (mret != CURLM_OK) 1269 if (mret != CURLM_OK)
@@ -1301,6 +1307,11 @@ client_connect_put (struct Session *s)
1301 curl_easy_setopt (s->client_put, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); 1307 curl_easy_setopt (s->client_put, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
1302 curl_easy_setopt (s->client_put, CURLOPT_SSL_VERIFYPEER, 0); 1308 curl_easy_setopt (s->client_put, CURLOPT_SSL_VERIFYPEER, 0);
1303 curl_easy_setopt (s->client_put, CURLOPT_SSL_VERIFYHOST, 0); 1309 curl_easy_setopt (s->client_put, CURLOPT_SSL_VERIFYHOST, 0);
1310 curl_easy_setopt (s->client_get, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
1311 curl_easy_setopt (s->client_get, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS);
1312#else
1313 curl_easy_setopt (s->client_get, CURLOPT_PROTOCOLS, CURLPROTO_HTTP);
1314 curl_easy_setopt (s->client_get, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP);
1304#endif 1315#endif
1305 curl_easy_setopt (s->client_put, CURLOPT_URL, s->url); 1316 curl_easy_setopt (s->client_put, CURLOPT_URL, s->url);
1306 curl_easy_setopt (s->client_put, CURLOPT_UPLOAD, 1L); 1317 curl_easy_setopt (s->client_put, CURLOPT_UPLOAD, 1L);