mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Fix remote resources download while hosting SSL site on Apache
As reported by Christian Folin and Walter Hop on our dev mailing list, Apache mod_ssl was failing if a remote resource was utilized. That was happening because Curl clean up was also cleaning up the OpenSSL data used by mod_ssl. This patch moves Curl initialization to happens while ModSecurity is initialized.
This commit is contained in:
@@ -258,7 +258,6 @@ int msc_remote_download_content(apr_pool_t *mp, const char *uri, const char *key
|
||||
|
||||
apr_id = apr_psprintf(mp, "ModSec-unique-id: %s", id);
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
curl = curl_easy_init();
|
||||
|
||||
beacon_str_len = msc_beacon_string(NULL, 0);
|
||||
@@ -348,7 +347,6 @@ int msc_remote_download_content(apr_pool_t *mp, const char *uri, const char *key
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
curl_global_cleanup();
|
||||
return 0;
|
||||
#else
|
||||
return -3;
|
||||
|
Reference in New Issue
Block a user