From 4da7dc7895f9e8380850c450c6d54125edaf1e56 Mon Sep 17 00:00:00 2001 From: Jean Paul Galea Date: Tue, 14 Apr 2015 09:00:18 +0200 Subject: [PATCH] Have enough rope to hang yourself. - Don't be overly strict, and allow users to hang themselves in they want to. --- ykval-common.php | 16 ---------------- ykval-config.php | 22 ---------------------- 2 files changed, 38 deletions(-) diff --git a/ykval-common.php b/ykval-common.php index 1c831e0..4ce1b33 100644 --- a/ykval-common.php +++ b/ykval-common.php @@ -144,23 +144,7 @@ function curl_settings($logger, $ident, $handle, $url, $timeout, $curlopts) { return; } - //allowed configurable options in ykval-config.php - $allowed = array( - CURLOPT_PROTOCOLS, - CURLOPT_IPRESOLVE, - CURLOPT_SSLVERSION, - CURLOPT_SSL_VERIFYPEER, - CURLOPT_SSL_VERIFYHOST, - CURLOPT_CAINFO, - CURLOPT_CAPATH, - ); - foreach($curlopts as $key => $val) { - if (in_array($key, $allowed) === FALSE) { - $logger->log(LOG_WARN, $ident . curl_opt_name($key) . " is not configurable"); - continue; - } - if (curl_setopt($handle, $key, $val) === FALSE) { $logger->log(LOG_WARN, $ident . " failed to set " . curl_opt_name($key)); continue; diff --git a/ykval-config.php b/ykval-config.php index d0bcf95..e577666 100644 --- a/ykval-config.php +++ b/ykval-config.php @@ -81,34 +81,12 @@ $baseParams['__YKVAL_SYNC_DEFAULT_TIMEOUT__'] = 1; # A key -> value array with curl options to set # when calling URLs defined in __YKVAL_SYNC_POOL__ -# -# Only the following options are configurable; -# CURLOPT_PROTOCOLS -# CURLOPT_IPRESOLVE -# CURLOPT_SSLVERSION -# CURLOPT_SSL_VERIFYPEER -# CURLOPT_SSL_VERIFYHOST -# CURLOPT_CAINFO -# CURLOPT_CAPATH -# -# Any other option is ignored and a warning is emitted. $baseParams['__YKVAL_SYNC_CURL_OPTS__'] = array( //CURLOPT_PROTOCOLS => CURLPROTO_HTTP, ); # A key -> value array with curl options to set # when calling URLs returned by otp2ksmurls() -# -# Only the following options are configurable; -# CURLOPT_PROTOCOLS -# CURLOPT_IPRESOLVE -# CURLOPT_SSLVERSION -# CURLOPT_SSL_VERIFYPEER -# CURLOPT_SSL_VERIFYHOST -# CURLOPT_CAINFO -# CURLOPT_CAPATH -# -# Any other option is ignored and a warning is emitted. $baseParams['__YKVAL_KSM_CURL_OPTS__'] = array( //CURLOPT_PROTOCOLS => CURLPROTO_HTTP, );