mirror of
https://github.com/irssi/irssi.git
synced 2025-04-25 12:31:09 -05:00
minor cleanup
This commit is contained in:
parent
f2b97631e1
commit
98b391f62e
@ -250,7 +250,7 @@ static void scram_authenticate(IRC_SERVER_REC *server, const char *data, const c
|
||||
scram_session_create(digest, conn->sasl_username, conn->sasl_password);
|
||||
|
||||
if (conn->scram_session == NULL) {
|
||||
g_error("Could not create SCRAM session with digest %s", digest);
|
||||
g_critical("Could not create SCRAM session with digest %s", digest);
|
||||
irc_send_cmd_now(server, "AUTHENTICATE *");
|
||||
return;
|
||||
}
|
||||
@ -260,13 +260,13 @@ static void scram_authenticate(IRC_SERVER_REC *server, const char *data, const c
|
||||
|
||||
if (ret == SCRAM_IN_PROGRESS) {
|
||||
// Authentication is still in progress
|
||||
GString *resp = g_string_new(output);
|
||||
GString *resp = g_string_new_len(output, output_len);
|
||||
sasl_send_response(server, resp);
|
||||
g_string_free(resp, TRUE);
|
||||
g_free(output);
|
||||
} else if (ret == SCRAM_SUCCESS) {
|
||||
// Authentication succeeded
|
||||
irc_send_cmd_now(server, "AUTHENTICATE +");
|
||||
sasl_send_response(server, NULL);
|
||||
scram_session_free(conn->scram_session);
|
||||
conn->scram_session = NULL;
|
||||
} else if (ret == SCRAM_ERROR) {
|
||||
|
@ -137,7 +137,8 @@ static scram_status process_server_first(SCRAM_SESSION_REC *session, const char
|
||||
param_count = g_strv_length(params);
|
||||
|
||||
if (param_count < 3) {
|
||||
session->error = g_strdup_printf("Invalid server-first-message: %s", data);
|
||||
/* Invalid server-first-message */
|
||||
session->error = g_strdup_printf("%s", data);
|
||||
g_strfreev(params);
|
||||
return SCRAM_ERROR;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user