From eeafd627160ed7b52dcada511be10aebaa388392 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 20 Jan 2013 20:50:10 +0000 Subject: [PATCH] Check SHA1 valid --- src/jabber.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jabber.c b/src/jabber.c index 3ac692c0..bc314b0d 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -1084,6 +1084,11 @@ _disco_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, win_current_page_off(); ui_refresh(); + if (g_strcmp0(given_sha1, generated_sha1) != 0) { + log_info("Invalid SHA1 recieved for caps."); + return 1; + } + // already cached if (caps_contains(node)) { log_info("Client info already cached.");