parent
7cc36539e7
commit
4348ad7675
2 changed files with 9 additions and 1 deletions
|
|
@ -9,6 +9,10 @@ repository history](https://github.com/ddclient/ddclient/commits/master).
|
|||
|
||||
* Added support for OVH DynHost.
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fixed freedns.afraid.org for passwords longer than 16 characters.
|
||||
|
||||
### Compatibility and dependency changes
|
||||
|
||||
* Perl v5.10.1 or later is now required.
|
||||
|
|
|
|||
6
ddclient
6
ddclient
|
|
@ -3844,7 +3844,11 @@ sub nic_freedns_update {
|
|||
|
||||
## First get the list of updatable hosts
|
||||
my $url;
|
||||
$url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=" . &sha1_hex("$config{$_[0]}{'login'}|$config{$_[0]}{'password'}");
|
||||
# https://freedns.afraid.org/api/ says, "Password is maximum length of 16 characters."
|
||||
# Experimentation has shown that this means that longer passwords must be truncated.
|
||||
my $truncated_password = substr($config{$_[0]}{'password'}, 0, 16);
|
||||
my $hashed_creds = sha1_hex("$config{$_[0]}{'login'}|$truncated_password");
|
||||
$url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=" . $hashed_creds;
|
||||
my $reply = geturl(opt('proxy'), $url);
|
||||
if (!defined($reply) || !$reply || !header_ok($_[0], $reply)) {
|
||||
failed("updating %s: Could not connect to %s for site list.", $_[0], $url);
|
||||
|
|
|
|||
Loading…
Reference in a new issue