diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-02-26 12:56:44 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-02-26 12:56:44 +0100 |
commit | 6d549d0da938c1f495c9751444dc8cf9b48bde01 (patch) | |
tree | 93c90b9c6e2758b1248174aa76d16265ab2890e0 /src/plugins/relay | |
parent | 22686da40c293b3106099676ea25881736d42ba0 (diff) | |
download | weechat-6d549d0da938c1f495c9751444dc8cf9b48bde01.zip |
relay/api: rename "salt" to "timestamp"
Diffstat (limited to 'src/plugins/relay')
-rw-r--r-- | src/plugins/relay/relay-config.c | 2 | ||||
-rw-r--r-- | src/plugins/relay/relay-http.c | 8 | ||||
-rw-r--r-- | src/plugins/relay/relay-http.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c index d9805aa59..150ed8d03 100644 --- a/src/plugins/relay/relay-config.c +++ b/src/plugins/relay/relay-config.c @@ -1375,7 +1375,7 @@ relay_config_init () relay_config_file, relay_config_section_network, "time_window", "integer", N_("number of seconds to allow before and after the current time " - "for salted password in api protocol"), + "for the hash of time + password in api protocol"), NULL, 0, 256, "5", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); relay_config_network_tls_cert_key = weechat_config_new_option ( diff --git a/src/plugins/relay/relay-http.c b/src/plugins/relay/relay-http.c index 97a70b395..b539d26e4 100644 --- a/src/plugins/relay/relay-http.c +++ b/src/plugins/relay/relay-http.c @@ -566,7 +566,7 @@ relay_http_add_to_body (struct t_relay_http_request *request, * -3: missing TOTP * -4: invalid TOTP * -5: invalid hash algorithm - * -6: invalid salt + * -6: invalid timestamp (used as salt) * -7: invalid number of iterations (PBKDF2) * -8: out of memory */ @@ -643,7 +643,7 @@ relay_http_get_auth_status (struct t_relay_client *client) case -1: /* invalid hash algorithm */ rc = -5; goto end; - case -2: /* invalid salt */ + case -2: /* invalid timestamp */ rc = -6; goto end; case -3: /* invalid iterations */ @@ -749,10 +749,10 @@ relay_http_check_auth (struct t_relay_client *client) NULL, RELAY_HTTP_ERROR_INVALID_HASH_ALGO); break; - case -6: /* invalid salt */ + case -6: /* invalid timestamp */ relay_http_send_error_json (client, RELAY_HTTP_401_UNAUTHORIZED, NULL, - RELAY_HTTP_ERROR_INVALID_SALT); + RELAY_HTTP_ERROR_INVALID_TIMESTAMP); break; case -7: /* invalid iterations */ relay_http_send_error_json (client, RELAY_HTTP_401_UNAUTHORIZED, diff --git a/src/plugins/relay/relay-http.h b/src/plugins/relay/relay-http.h index c53c74bdf..e3b6c2bf4 100644 --- a/src/plugins/relay/relay-http.h +++ b/src/plugins/relay/relay-http.h @@ -47,7 +47,7 @@ enum t_relay_client_http_status #define RELAY_HTTP_ERROR_INVALID_TOTP "Invalid TOTP" #define RELAY_HTTP_ERROR_INVALID_HASH_ALGO "Invalid hash algorithm " \ "(not found or not supported)" -#define RELAY_HTTP_ERROR_INVALID_SALT "Invalid salt" +#define RELAY_HTTP_ERROR_INVALID_TIMESTAMP "Invalid timestamp" #define RELAY_HTTP_ERROR_INVALID_ITERATIONS "Invalid number of iterations" #define RELAY_HTTP_ERROR_OUT_OF_MEMORY "Out of memory" |