Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ox: Don't print message in chatwindow for messages without body #1693

Closed
mdosch opened this issue Apr 17, 2022 · 1 comment
Closed

Ox: Don't print message in chatwindow for messages without body #1693

mdosch opened this issue Apr 17, 2022 · 1 comment
Assignees
Milestone

Comments

@mdosch
Copy link
Contributor

mdosch commented Apr 17, 2022

I am seeing OX error: No paylod body found in the chat window for messages without body (probably encrypted presence/read marker/typing notification) sent by gajim.

Debian Unstable

profanity -v
Profanity, version 0.12.1dev.master.8ffd8079
Copyright (C) 2012 - 2019 James Booth <boothj5web@gmail.com>.
Copyright (C) 2019 - 2021 Michael Vetter <jubalh@iodoru.org>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.16.0-unknown)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Disabled
GTK icons/clipboard: Disabled
@jubalh jubalh closed this as completed in 2dc0cc4 Apr 27, 2022
@jubalh
Copy link
Member

jubalh commented Apr 27, 2022

@StefanKropp @DebXWoody please check _handle_ox_chat() I don't understand what you are doing there.
1)
First plain is assigned message->plain = p_ox_gpg_decrypt(xmpp_stanza_get_text(ox));
and then in the same if block you overwrite this with message->plain = xmpp_stanza_get_text(b); without freeing the old value as far as I can see.

Sometimes even doing message->plain = "OX error: No payload found";. Shouldn't there be a strdup()? I think later on we try to free the whole message struct. So we can't mix this static things.

For now I removed the printing to the window of this message and changed the logging to debug. But please check the rest of the code.

@jubalh jubalh self-assigned this Apr 27, 2022
@jubalh jubalh added this to the 0.13.0 milestone Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants