Richard Hansen
160344514f
Improve readability by simplifying if
conditions
2024-06-22 02:27:44 -04:00
Richard Hansen
288a30ab1e
Whitespace fixes
2024-06-22 01:38:28 -04:00
Richard Hansen
afa6db8129
Merge pull request #687 from rhansen/ci
...
ci: Switch from RedHat UBI to AlmaLinux
2024-06-06 20:22:47 -04:00
Richard Hansen
0c42478ea7
ci: Switch from RedHat UBI to AlmaLinux
2024-06-06 20:16:07 -04:00
Richard Hansen
1ee64537df
Merge pull request #686 from rhansen/header_ok
...
Minor improvements to `header_ok` utility function
2024-06-06 19:40:44 -04:00
Richard Hansen
2d4a93d5e7
header_ok: Fix typo(?) in HTTP response regular expression
2024-06-06 19:34:06 -04:00
Richard Hansen
211d59fccc
header_ok: Log all non-2xx HTTP status codes
2024-06-06 19:34:06 -04:00
Richard Hansen
7fe7fd0e18
header_ok: Refactor for readability
2024-06-06 19:34:06 -04:00
Richard Hansen
adbac91be7
header_ok: Only keep first line of argument
...
This allows callers to pass the entire response without generating
overly long error messages.
2024-06-06 19:34:06 -04:00
Richard Hansen
b58a10b3e3
header_ok: Add unit tests
2024-06-06 19:34:06 -04:00
Richard Hansen
a486d4f976
Merge pull request #685 from rhansen/module-load
...
Improve loading of optional SHA1 and JSON modules
2024-06-06 19:10:21 -04:00
Richard Hansen
bb658d763a
Simplify loading of JSON::PP
2024-06-06 19:08:15 -04:00
Richard Hansen
1401ff4aea
Only attempt to load Digest::SHA
...
`Digest::SHA` has been a core module for a long time, and
`Digest::SHA1` has not been updated in a long time.
2024-06-06 19:07:25 -04:00
Richard Hansen
1e1e100d7f
Prefer Digest::SHA
over Digest::SHA1
...
`Digest::SHA` is a core module; `Digest::SHA1` is not.
2024-06-04 18:44:25 -04:00
Richard Hansen
a0240345bf
Use Module->import(...)
instead of import(Module, ...)
...
This matches the documentation of the `use` statement.
2024-06-04 18:44:25 -04:00
Richard Hansen
11be757d54
Merge pull request #683 from rhansen/curl
...
curl execution improvements
2024-06-03 03:27:15 -04:00
Richard Hansen
1c1642acfd
configure.ac: Allow users to specify path to curl
2024-06-03 03:13:05 -04:00
Richard Hansen
31dbd8e4ed
geturl: Set raw (binary) mode when reading from curl
2024-06-03 03:13:05 -04:00
Richard Hansen
8e901c3db6
geturl: Avoid the shell when invoking curl
2024-06-02 17:00:05 -04:00
Richard Hansen
09d8d0426e
geturl: Don't suppress curl's STDERR
...
This makes it easier for users to troubleshoot problems.
2024-06-02 17:00:05 -04:00
Richard Hansen
09ce262c82
Merge pull request #674 from jortkoopmans/bugfix/673_Fix_DnsExit_subdomain
...
Fix DNSExit provider when provided with a zone and a non-identical hostname
2024-06-02 16:58:43 -04:00
jortkoopmans
73a67b728d
dnsexit2: Move body of for
loop to a separate function
...
For improved readability.
2024-06-02 16:58:00 -04:00
Richard Hansen
11d0c84639
dnsexit2: Don't skip remaining hosts on connect error or non-2xx
...
A non-2xx status code might be host-specific, so ddclient should
continue with the next host. We could skip the remaining hosts if
there is a connection failure, but it doesn't hurt to retry.
2024-06-02 16:58:00 -04:00
jortkoopmans
216741c9ce
dnsexit2: Fix when provided with a zone and a non-identical hostname
...
Trim the zone from the hostname in the request to fix issue.
2024-06-02 16:58:00 -04:00
jortkoopmans
ec2d5f7f69
dnsexit2: Add tests
...
Needs LWP::UserAgent.
2024-06-02 16:58:00 -04:00
Richard Hansen
282bb01e17
Bump version to v3.12.0~alpha
...
Enough has changed to warrant a minor revision bump.
2024-06-01 03:49:16 -04:00
Richard Hansen
a0e119c2f2
Merge pull request #681 from rhansen/group_hosts_by
...
group_hosts_by: Add IPv6 and undef/unset support
2024-06-01 03:09:18 -04:00
Richard Hansen
e60e6e804b
group_hosts_by: Use Data::Dumper
to make the group signature
...
This is a bit more robust than manually making the group signature
because it gracefully handles corner cases such as `undef`.
2024-06-01 03:06:06 -04:00
Richard Hansen
f4802fc534
Fix group_hosts_by
call for IPv6-enabled services
2024-06-01 03:05:36 -04:00
Richard Hansen
343fcff625
group_hosts_by: Add support for wantipv4
, wantipv6
2024-06-01 03:05:36 -04:00
Richard Hansen
ce0a362fd0
group_hosts_by: Add tests
2024-06-01 03:05:26 -04:00
Richard Hansen
ddb04075be
Merge pull request #680 from rhansen/dnsexit2
...
dnsexit2: Fix parsing of JSON response
2024-05-31 03:27:34 -04:00
Richard Hansen
f976b771d4
dnsexit2: Fix logging of erroneous response body
2024-05-30 18:29:38 -04:00
Richard Hansen
f7f4856b93
dnsexit2: Combine related log messages
2024-05-30 18:28:57 -04:00
Richard Hansen
24a22092ca
dnsexit2: Don't croak if JSON decoding fails
2024-05-30 18:22:59 -04:00
Richard Hansen
d28c8ea7ad
dnsexit2: Delete unnecessary debug messages
2024-05-30 17:56:51 -04:00
Richard Hansen
7b95b379aa
dnsexit2: Fix extraction and processing of JSON response body
2024-05-30 17:52:12 -04:00
Richard Hansen
86ec02a9b6
Merge pull request #679 from rhansen/dnsexit2
...
dnsexit2: Minor fixes and improvements
2024-05-30 17:22:52 -04:00
Richard Hansen
2a47b17541
dnsexit2: Include the unexpected status in the error message
2024-05-30 16:26:44 -04:00
Richard Hansen
d8a1449a19
dnsexit2: Fix error message format string
...
This fixes a bug introduced in commit
2bf6d348b0
.
2024-05-30 16:25:25 -04:00
Richard Hansen
6e5e2ab63f
dnsexit2: Remove https://
from update service URL
...
This allows the `ssl` setting to control TLS vs. plain HTTP, and makes
it possible to create a compatible service that doesn't use TLS (e.g.,
for testing).
2024-05-30 16:21:25 -04:00
Richard Hansen
eebb1b8a47
dnsexit2: Delete redundant status-ipv*
assignments
2024-05-30 16:19:41 -04:00
Richard Hansen
b3951e407a
Merge pull request #678 from rhansen/dnsexit2
...
dnsexit2: Code health improvements
2024-05-30 05:02:11 -04:00
Richard Hansen
3c84f7a1b5
dnsexit2: Delete unnecessary debug messages
2024-05-30 04:49:46 -04:00
Richard Hansen
5b7400ae7d
dnsexit2: Normalize the zone up front
2024-05-30 04:48:44 -04:00
Richard Hansen
46bca54393
dnsexit2: Fix string interpolation
2024-05-30 04:04:19 -04:00
Richard Hansen
da9f39917f
dnsexit2: Inline some unnecessary variables
2024-05-29 18:29:09 -04:00
Richard Hansen
6c89eaf4ac
dnsexit2: Build updates array directly, not hash to array
...
to improve readability, and to make it easier to use
`group_hosts_by()` in the future to update multiple hosts at the same
time.
2024-05-29 18:25:24 -04:00
Richard Hansen
2bf6d348b0
dnsexit2: Reuse the $url
variable
2024-05-29 18:25:24 -04:00
Richard Hansen
4804e15c12
dnsexit2: Add final comma after last list item
...
for consistency, and to avoid bugs if additional items are added or
the items are reordered.
2024-05-29 18:25:24 -04:00