mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-08 03:54:20 +01:00
Have enough rope to hang yourself.
- Don't be overly strict, and allow users to hang themselves in they want to.
This commit is contained in:
parent
8df329aa0e
commit
4da7dc7895
@ -144,23 +144,7 @@ function curl_settings($logger, $ident, $handle, $url, $timeout, $curlopts) {
|
|||||||
return;
|
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) {
|
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) {
|
if (curl_setopt($handle, $key, $val) === FALSE) {
|
||||||
$logger->log(LOG_WARN, $ident . " failed to set " . curl_opt_name($key));
|
$logger->log(LOG_WARN, $ident . " failed to set " . curl_opt_name($key));
|
||||||
continue;
|
continue;
|
||||||
|
@ -81,34 +81,12 @@ $baseParams['__YKVAL_SYNC_DEFAULT_TIMEOUT__'] = 1;
|
|||||||
|
|
||||||
# A key -> value array with curl options to set
|
# A key -> value array with curl options to set
|
||||||
# when calling URLs defined in __YKVAL_SYNC_POOL__
|
# 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(
|
$baseParams['__YKVAL_SYNC_CURL_OPTS__'] = array(
|
||||||
//CURLOPT_PROTOCOLS => CURLPROTO_HTTP,
|
//CURLOPT_PROTOCOLS => CURLPROTO_HTTP,
|
||||||
);
|
);
|
||||||
|
|
||||||
# A key -> value array with curl options to set
|
# A key -> value array with curl options to set
|
||||||
# when calling URLs returned by otp2ksmurls()
|
# 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(
|
$baseParams['__YKVAL_KSM_CURL_OPTS__'] = array(
|
||||||
//CURLOPT_PROTOCOLS => CURLPROTO_HTTP,
|
//CURLOPT_PROTOCOLS => CURLPROTO_HTTP,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user