From 2a034326a80c81bef7fafe92d9e96448819c8680 Mon Sep 17 00:00:00 2001 From: NOYB <1977521+NOYB@users.noreply.github.com> Date: Wed, 26 Feb 2020 04:22:54 -0800 Subject: [PATCH] DynDNS Custom Updater: Un-restrict Verify Peer & IPv4 Resolve Verify peer and IP resolve have value aside from authentication. For cases where authentication is not used it can still be desirable to confirm identity and prevent MITM. --- .../etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc b/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc index 5a2784c5a..1b0c7b698 100644 --- a/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc +++ b/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc @@ -733,15 +733,15 @@ class updatedns break; case 'custom': case 'custom-v6': + if ($this->_curlIpresolveV4) { + curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + } + if ($this->_curlSslVerifypeer) { + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); + } else { + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + } if ($this->_dnsUser != '') { - if ($this->_curlIpresolveV4) { - curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); - } - if ($this->_curlSslVerifypeer) { - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - } else { - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - } curl_setopt($ch, CURLOPT_USERPWD, "{$this->_dnsUser}:{$this->_dnsPass}"); } $server = str_replace("%IP%", $this->_dnsIP, $this->_dnsUpdateURL);