diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d5c0f4..6a99582 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,17 +13,22 @@ commit done between releases. *There is currently no beta releases of Parsee* ## Alpha -### v0.2.0[star-of-hope] +### v0.2.0[star-of-hope] Fixes some media metadata things, replaces the build system, tries out avatar support some more and speeds up Parsee a tad bit. #### New things -- Start dealing with some basic PEP and vCard-based avatars. -- Allows experimental MbedTLS through a specific Cytoplasm -patch. -- Banning Parsee from a XMPP MUC effectively unlinks it. -- Start adding basic documentation to Parsee +- Start dealing with some basic PEP and vCard-based avatar +support from both sides. +- Banning Parsee from a XMPP MUC effectively unlinks it from +the MUC. +- Start adding basic documentation to Parsee, through the +wiki page. - Add MUC whitelists for plumbing, alongside a `whitelist` tool +- Add (yet unused) parameter for setting the max stanza size +allowed. +- Allows experimental MbedTLS through a specific Cytoplasm +patch (though still unstable AND slow). #### Bugfixes - Adds more information to media events so that clients can @@ -34,10 +39,20 @@ Android's weird rendering. - Start fixing bug where Parsee takes several seconds to send a message coming from XMPP with MbedTLS(it is still slow and unstable) +- Fix issue where the XMPP server would kill Parsee if avatars +are too large. +- Refactor some of the code to abstract sending stanzas down +the wire to a specific function, thus allowing us to check +for certain conditions more easily(for example, verifying the +size on the fly, or having extensions being able to postprocess +the stanza). +- Parsee now stops when a stream error is received, instead of +being in a limbo state. #### Deprecated features - The old `build.c` and `Makefile`s used for building are removed, and replaced by the `configure.c` C file(/script via TCC). + ### v0.1.0[tomboyish-bridges-adventure] <9/9/2024> Nothing much to say, but this is the first alpha release of Parsee. May occasionally deadlock. diff --git a/src/Parsee/Data.c b/src/Parsee/Data.c index 446e766..f858060 100644 --- a/src/Parsee/Data.c +++ b/src/Parsee/Data.c @@ -588,7 +588,7 @@ ParseeUnlinkRoom(ParseeData *data, char *chat_id) bool ParseeIsMUCWhitelisted(ParseeData *data, char *muc) { - char *server, *serv_start; + char *server, *serv_start, *postserv; DbRef *ref; bool ret; if (!data || !muc) @@ -604,9 +604,10 @@ ParseeIsMUCWhitelisted(ParseeData *data, char *muc) serv_start = strchr(muc, '@'); serv_start = serv_start ? serv_start : muc; server = StrDuplicate(serv_start + 1); - if (strchr(server, '/')) + postserv = server ? strchr(server, '/') : NULL; + if (postserv) /* GCC doesn't know strchr is pure. */ { - *(strchr(server, '/')) = '\0'; + *postserv = '\0'; } ref = DbLockIntent(data->db, diff --git a/src/XMPPThread/Bridged.c b/src/XMPPThread/Bridged.c index 7e047a4..0ad23ab 100644 --- a/src/XMPPThread/Bridged.c +++ b/src/XMPPThread/Bridged.c @@ -121,7 +121,7 @@ ParseeVerifyAllStanza(ParseeData *args, XMLElement *stanza) bool ServerHasXEP421(ParseeData *data, char *from) { - char *server = NULL, *parsee; + char *server = NULL, *postserv, *parsee; XMLElement *disco; bool ret = false; if (!data || !from) @@ -140,9 +140,10 @@ ServerHasXEP421(ParseeData *data, char *from) } server = StrDuplicate(server); - if (strchr(server, '/')) + postserv = server ? strchr(server, '/') : NULL; + if (postserv) { - *(strchr(server, '/')) = '\0'; + *postserv = '\0'; } parsee = ParseeJID(data);