summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2016-10-21 07:49:10 +0200
committerSébastien Helleu <flashcode@flashtux.org>2016-10-21 07:49:10 +0200
commit133cbbd947520f9971db87da1216811cf1ddaa4b (patch)
tree516ea499f6460a35c1fc71650c2f78792f0f4876
parentb51beb67663f85f137aaef77d2cfa611db2803ec (diff)
downloadweechat-133cbbd947520f9971db87da1216811cf1ddaa4b.zip
relay: set status to AUTH_FAILED in case of auth failure in weechat protocol (closes #825)
-rw-r--r--ChangeLog.adoc4
-rw-r--r--src/plugins/relay/weechat/relay-weechat-protocol.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index f8189ae46..dce3b7674 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -22,6 +22,10 @@ Improvements::
* irc: change default value of option irc.network.lag_reconnect to 300 (issue #818)
+Bug fixes::
+
+ * relay: set status to "authentication failed" and close immediately connection in case of authentication failure in weechat protocol (issue #825)
+
[[v1.6]]
== Version 1.6 (2016-10-02)
diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c
index ab9835b18..e90c69e6f 100644
--- a/src/plugins/relay/weechat/relay-weechat-protocol.c
+++ b/src/plugins/relay/weechat/relay-weechat-protocol.c
@@ -211,6 +211,9 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(init)
weechat_string_free_split_command (options);
}
+ if (!RELAY_WEECHAT_DATA(client, password_ok))
+ relay_client_set_status (client, RELAY_STATUS_AUTH_FAILED);
+
return WEECHAT_RC_OK;
}
@@ -1383,7 +1386,7 @@ relay_weechat_protocol_recv (struct t_relay_client *client, const char *data)
* then close connection!
*/
relay_client_set_status (client,
- RELAY_STATUS_DISCONNECTED);
+ RELAY_STATUS_AUTH_FAILED);
}
else
{