mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 07:00:05 +01:00
connectivity,cloud-setup: restrict curl protocols to HTTP and HTTPS
See-also: https://fedoraproject.org/wiki/Changes/CurlMinimal_as_Default#Benefit_to_Fedora
See-also: 55b90ee00b
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1121
This commit is contained in:
parent
9f6114afe8
commit
7a1734926a
2 changed files with 2 additions and 0 deletions
|
|
@ -694,6 +694,7 @@ do_curl_request(NMConnectivityCheckHandle *cb_data)
|
||||||
curl_easy_setopt(ehandle, CURLOPT_INTERFACE, cb_data->ifspec);
|
curl_easy_setopt(ehandle, CURLOPT_INTERFACE, cb_data->ifspec);
|
||||||
curl_easy_setopt(ehandle, CURLOPT_RESOLVE, cb_data->concheck.hosts);
|
curl_easy_setopt(ehandle, CURLOPT_RESOLVE, cb_data->concheck.hosts);
|
||||||
curl_easy_setopt(ehandle, CURLOPT_IPRESOLVE, resolve);
|
curl_easy_setopt(ehandle, CURLOPT_IPRESOLVE, resolve);
|
||||||
|
curl_easy_setopt(ehandle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
|
||||||
|
|
||||||
curl_multi_add_handle(mhandle, ehandle);
|
curl_multi_add_handle(mhandle, ehandle);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -305,6 +305,7 @@ nm_http_client_get(NMHttpClient *self,
|
||||||
curl_easy_setopt(edata->ehandle, CURLOPT_WRITEFUNCTION, _get_writefunction_cb);
|
curl_easy_setopt(edata->ehandle, CURLOPT_WRITEFUNCTION, _get_writefunction_cb);
|
||||||
curl_easy_setopt(edata->ehandle, CURLOPT_WRITEDATA, edata);
|
curl_easy_setopt(edata->ehandle, CURLOPT_WRITEDATA, edata);
|
||||||
curl_easy_setopt(edata->ehandle, CURLOPT_PRIVATE, edata);
|
curl_easy_setopt(edata->ehandle, CURLOPT_PRIVATE, edata);
|
||||||
|
curl_easy_setopt(edata->ehandle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
|
||||||
|
|
||||||
if (http_headers) {
|
if (http_headers) {
|
||||||
for (i = 0; http_headers[i]; ++i) {
|
for (i = 0; http_headers[i]; ++i) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue