Commit graph

1515 commits

Author SHA1 Message Date
Richard Hansen
71dc1f92e4 zoneedit1: Fix logged host names 2024-07-31 00:39:47 -04:00
Richard Hansen
9dce53ea4a
Merge pull request #724 from vladmovchan/master
Correct NoIP example
2024-07-31 00:37:41 -04:00
Vladyslav Movchan
af65dd86cf Correct NoIP example
An extra comma in the example causes `401 Unauthorized` / `badauth`
2024-07-31 00:37:04 -04:00
Richard Hansen
9c5160a514 Whitespace fixes 2024-07-30 02:25:05 -04:00
Richard Hansen
5620127c71 Delete unnecessary comments 2024-07-30 02:24:27 -04:00
Richard Hansen
96ada0c79e inwx: Add comment explaining why hostnames are not in update URL 2024-07-29 23:45:55 -04:00
Richard Hansen
32f95526f9
Merge pull request #723 from rhansen/infomaniak
infomaniak: Fix response status processing
2024-07-29 04:09:41 -04:00
Richard Hansen
d380e17aba infomaniak: Fix response status processing
Previously, `nochg` responses were treated as failures and the logged
message for all responses was incorrect (either `undef` or "Unknown
reply from Infomaniak").

Background: Hash values are always scalars, so lists of values can
only be stored in hashes in arrayref form.

The following is legal but does not do what one might expect:

    my %h = (
        a => (1, 2),
        b => (3, 4),
    );

The `=>` operator is just a variant of the comma operator, and lists
in list context are flattened, so the above is equivalent to:

    my %h = ('a', 1, 2, 'b', 3, 4);

which is equivalent to:

    my %h = (
        a => 1,
        2 => 'b',
        3 => 4,
    );

which is obviously not what was intended.
2024-07-29 04:07:15 -04:00
Richard Hansen
3f0fd0f37b infomaniak: Use variable interpolation instead of sprintf
for readability.
2024-07-29 04:02:42 -04:00
Richard Hansen
bb65b64e39 infomaniak: Whitespace fixes 2024-07-29 04:02:42 -04:00
Richard Hansen
2715743ee3
Merge pull request #721 from rhansen/gandi
`gandi` cleanups
2024-07-28 19:15:29 -04:00
Richard Hansen
0b30df4b69 gandi: Fix processing of PUT error responses
Before, the returned JSON wasn't even parsed -- the error handling
code was reusing the parsed response from the earlier `GET`.  Also, it
was reading object properties that were not documented in the Gandi
API documentation.
2024-07-28 19:04:30 -04:00
Richard Hansen
06c3dd5825 gandi: Invert condition to improve readability 2024-07-28 18:24:19 -04:00
Richard Hansen
6f505e6538 gandi: Inline an unnecessary variable 2024-07-28 18:24:19 -04:00
Richard Hansen
5e52f728ad gandi: Use an array for headers for readability 2024-07-28 18:24:19 -04:00
Richard Hansen
a890b08935 gandi: Check for JSON object, not just definedness 2024-07-28 18:24:19 -04:00
Richard Hansen
b1ddaa0ce8 gandi: Log message improvements 2024-07-28 18:24:19 -04:00
Richard Hansen
12d5539abc gandi: Don't ignore HTTP response code 2024-07-28 18:24:19 -04:00
Richard Hansen
325eb10536 gandi: Style fixes for readability 2024-07-28 18:24:19 -04:00
Richard Hansen
2ccdefff93 gandi: Whitespace fixes 2024-07-28 18:24:19 -04:00
Richard Hansen
15595d01ac gandi: Delete unnecessary comment 2024-07-28 18:24:19 -04:00
Richard Hansen
26d7aa500a
Merge pull request #720 from rhansen/delete
Delete some unnecessary code
2024-07-28 18:22:19 -04:00
Richard Hansen
0fa7e132b1 logging: Delete now-unused verbose function 2024-07-28 17:52:42 -04:00
Richard Hansen
54d381a18e nsupdate: Convert some verbase log messages to debug 2024-07-28 17:52:42 -04:00
Richard Hansen
61cc5d66ae logging: Delete unnecessary verbose calls
The same information (or more) is logged in the previous line.
2024-07-28 17:48:58 -04:00
Richard Hansen
ee0940175e Delete redundant calls to failed
`header_ok` already calls `failed` if there's an error.
2024-07-28 03:45:10 -04:00
Richard Hansen
f410b915ce Delete redundant checks
`header_ok` already asserts that the reply is defined and non-empty.
2024-07-28 03:45:10 -04:00
Richard Hansen
228efa7927
Merge pull request #719 from rhansen/cleanups
Various minor cleanups and improvements
2024-07-27 04:46:46 -04:00
Richard Hansen
fc453a0de3 porkbun: Check for JSON object, not just non-null 2024-07-27 04:40:34 -04:00
Richard Hansen
536c7c87a2 porkbun: Invert condition to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
d8a23ff9a4 porkbun: Improve log messages 2024-07-27 04:40:34 -04:00
Richard Hansen
e1c8b26f7b porkbun: Simplify string equality check 2024-07-27 04:40:34 -04:00
Richard Hansen
0c31681d35 porkbun: Simplify array length check 2024-07-27 04:40:34 -04:00
Richard Hansen
16b15ea089 porkbun: Remove headers from HTTP response before processing 2024-07-27 04:40:34 -04:00
Richard Hansen
c65d5c1254 porkbun: Don't bother setting status on failure
It's already initialized to a non-success value.
2024-07-27 04:40:34 -04:00
Richard Hansen
bafd5a8715 porkbun: Inline unnecessary variables 2024-07-27 04:40:34 -04:00
Richard Hansen
45d832145f porkbun: Simplify RR set type 2024-07-27 04:40:34 -04:00
Richard Hansen
038b31cf77 porkbun: Simplify zone removal logic 2024-07-27 04:40:34 -04:00
Richard Hansen
630a2d5d49 porkbun: Move "ipv" out of $ipv for consistency
This also makes it possible to change "ipv4" and "ipv6" in log
messages to "IPv4" and "IPv6".
2024-07-27 04:40:34 -04:00
Richard Hansen
4273580bdf porkbun: Consolidate lines to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
c6bcfd4644 porkbun: Quote interpolated variable in regex 2024-07-27 04:40:34 -04:00
Richard Hansen
1020145fdf porkbun: Rename variables for brevity and consistency 2024-07-27 04:40:34 -04:00
Richard Hansen
3f740c3e19 porkbun: Whitespace fixes 2024-07-27 04:40:34 -04:00
Richard Hansen
4b5b8ab62d porkbun: Delete unnecessary comments 2024-07-27 04:40:34 -04:00
Richard Hansen
3dae16457a dnsmadeeasy: Consolidate lines for readability 2024-07-27 04:40:34 -04:00
Richard Hansen
2eb0398cf2 dnsmadeeasy: Invert condition to improve readability 2024-07-27 04:40:34 -04:00
Richard Hansen
b07aa91ed5 dnsmadeeasy: Don't bother setting status on failure
It's already initialized to a non-success value.
2024-07-27 04:40:34 -04:00
Richard Hansen
971fe438a3 dnsmadeeasy: Convert string literal to compiled regex
for readability.
2024-07-27 04:40:34 -04:00
Richard Hansen
ca28694dd7 dnsmadeeasy: Don't assume the result code is known 2024-07-27 04:40:34 -04:00
Richard Hansen
11876498d5 dnsmadeeasy: Improve log messages 2024-07-27 04:40:34 -04:00