diff options
author | Sven Moritz Hallberg <pesco@khjk.org> | 2010-10-01 22:38:16 +0200 |
---|---|---|
committer | Sven Moritz Hallberg <pesco@khjk.org> | 2010-10-01 22:38:16 +0200 |
commit | f26db4a89ea0a61123a7aa4b70b1d4102a309b2e (patch) | |
tree | 9a5ab5cbcc6389af85eb71c09fc79f3c431d130c /otr.c | |
parent | 7c91392c8525486876fe381b33f21b7dd508477c (diff) |
explicitly handle cheating by smp opponent
Diffstat (limited to 'otr.c')
-rw-r--r-- | otr.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1073,6 +1073,14 @@ void otr_handle_smp(struct im_connection *ic, const char *handle, OtrlTLV *tlvs) } nextMsg = context->smstate->nextExpected; + if (context->smstate->sm_prog_state == OTRL_SMP_PROG_CHEATED) { + irc_usermsg(irc, "smp %s: opponent violated protocol, aborting", + u->nick); + otrl_message_abort_smp(us, ops, u->bu->ic, context); + otrl_sm_state_free(context->smstate); + return; + } + tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP1Q); if (tlv) { if (nextMsg != OTRL_SMP_EXPECT1) { |