about summary refs log tree commit diff stats
path: root/src/xmpp/iq.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2022-01-27 11:52:23 +0100
committerMichael Vetter <jubalh@iodoru.org>2022-01-27 11:52:23 +0100
commitb1929068ff581b3474f098866baf32ef851d8c18 (patch)
treef15dddd42bdb48823f4dd26e8d7ca77ed288a5ec /src/xmpp/iq.c
parentfada16bd6d0316ab84dd6dc7a10992ef1ed39afb (diff)
downloadprofani-tty-b1929068ff581b3474f098866baf32ef851d8c18.tar.gz
presence: guard against invalid input
It shouldn't happen that we get the presence stanza without a resource.

https://datatracker.ietf.org/doc/html/rfc6120

```
Implementation Note: It is the server's responsibility to deliver
only stanzas that are addressed to the client's full JID or the
user's bare JID; thus, there is no need for the client to check
the 'to' address of incoming stanzas.  However, if the client does
check the 'to' address then it is suggested to check at most the
bare JID portion (not the full JID), since the 'to' address might
be the user's bare JID, the client's current full JID, or even a
full JID with a different resourcepart (e.g., in the case of so-
called "offline messages" as described in [XEP-0160]).
```

Let's not segfault though.

Close https://github.com/profanity-im/profanity/issues/1630
Diffstat (limited to 'src/xmpp/iq.c')
0 files changed, 0 insertions, 0 deletions