Explicitly tell geturl
to ignore the global ssl
option
Changing behavior based on the identity of the caller is fragile and makes the code difficult to understand.
This commit is contained in:
parent
2e5db5af44
commit
7921c53605
1 changed files with 9 additions and 3 deletions
12
ddclient.in
12
ddclient.in
|
@ -1986,8 +1986,7 @@ sub geturl {
|
|||
|
||||
opt('fw') && debug("opt(fw = %s)", opt('fw'));
|
||||
$globals{'fw'} && debug("glo fw = %s", $globals{'fw'});
|
||||
## always omit SSL for connections to local router
|
||||
if ($force_ssl || ($globals{'ssl'} && ((caller(1))[3] // '') ne 'ddclient::get_ip')) {
|
||||
if ($force_ssl || ($globals{'ssl'} && !($params->{ignore_ssl_option} // 0))) {
|
||||
$use_ssl = 1;
|
||||
$default_port = '443';
|
||||
} else {
|
||||
|
@ -2167,7 +2166,11 @@ sub get_ip {
|
|||
$arg = $url;
|
||||
|
||||
if ($url) {
|
||||
$reply = geturl({ proxy => opt('proxy', $h), url => $url }) || '';
|
||||
$reply = geturl({
|
||||
proxy => opt('proxy', $h),
|
||||
url => $url,
|
||||
ignore_ssl_option => 1,
|
||||
}) || '';
|
||||
}
|
||||
|
||||
} elsif (($use eq 'cisco')) {
|
||||
|
@ -2188,6 +2191,7 @@ sub get_ip {
|
|||
url => $url,
|
||||
login => opt('fw-login', $h),
|
||||
password => opt('fw-password', $h),
|
||||
ignore_ssl_option => 1,
|
||||
}) || '';
|
||||
$arg = $url;
|
||||
|
||||
|
@ -2209,6 +2213,7 @@ sub get_ip {
|
|||
url => $url,
|
||||
login => opt('fw-login', $h),
|
||||
password => opt('fw-password', $h),
|
||||
ignore_ssl_option => 1,
|
||||
}) || '';
|
||||
$arg = $url;
|
||||
|
||||
|
@ -2227,6 +2232,7 @@ sub get_ip {
|
|||
url => $url,
|
||||
login => opt('fw-login', $h),
|
||||
password => opt('fw-password', $h),
|
||||
ignore_ssl_option => 1,
|
||||
}) || '';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue