mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 10:45:11 +00:00
[FIX/WIP] Chrck URI before doing anything funny
This commit is contained in:
parent
e2b014d000
commit
c96f0486ff
2 changed files with 6 additions and 2 deletions
|
|
@ -358,6 +358,10 @@ GetXMPPInformation(ParseeData *data, HashMap *event, char **from, char **to)
|
|||
static void
|
||||
ParseeMessageHandler(ParseeData *data, HashMap *event)
|
||||
{
|
||||
if (!data || !event)
|
||||
{
|
||||
return;
|
||||
}
|
||||
XMPPComponent *jabber = data->jabber;
|
||||
StanzaBuilder *builder = NULL;
|
||||
DbRef *ref = NULL;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ XMPPifyElement(const ParseeConfig *conf, HashMap *event, XMLElement *elem, XMPPF
|
|||
} \
|
||||
} \
|
||||
while (0)
|
||||
switch (elem->type)
|
||||
switch (elem ? elem->type : -1)
|
||||
{
|
||||
case XML_ELEMENT_DATA:
|
||||
Concat(elem->data);
|
||||
|
|
@ -155,7 +155,7 @@ XMPPifyElement(const ParseeConfig *conf, HashMap *event, XMLElement *elem, XMPPF
|
|||
{
|
||||
char *href = HashMapGet(elem->attrs, "href");
|
||||
Uri *pref = UriParse(href);
|
||||
if (StrEquals(pref->host, "matrix.to"))
|
||||
if (pref && StrEquals(pref->host, "matrix.to"))
|
||||
{
|
||||
/* TODO: Check if the element here is a Matrix.TO
|
||||
* pointing to a Parsee user. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue