467222d0ca
fix(ui,db): harden NULL handling, fix CWE-134, optimize iterations
...
CI Code / Code Coverage (push) Failing after 10m34s
CI Code / Check spelling (push) Failing after 10m47s
CI Code / Check coding style (push) Failing after 11m4s
CI Code / Linux (ubuntu) (push) Failing after 11m19s
CI Code / Linux (debian) (push) Failing after 11m28s
CI Code / Linux (arch) (push) Failing after 11m38s
security(CWE-134): fix format string injections + add CI check
fix(ui): subwindow lifecycle, newwin/newpad guards, fallback timestamps
fix(db): sqlite cleanup on failures, sqlite3_close_v2
fix(xmpp): queued_messages loop, barejid leak
perf(core): g_hash_table_iter_init instead of g_hash_table_get_keys
refactor(ui): CLAMP macro in _check_subwin_width
test: XEP-0012 and XEP-0045 functional tests
Author: jabber.developer2
Closes #58 , #85
2026-02-06 19:27:40 +01:00
Martin Dosch
50e82376b0
Remove plenking
...
There were two cases of plenking (a space between a word and the punctuation
marks) in front of `…`.
2024-10-03 15:51:52 +02:00
John Hernandez
e1d137f4e6
Change char->free to auto_char char for autocleanup
...
Replace `gchar` and `g_free` to `auto_gchar`
Correct certain `char` functions/variables to `gchar`
Related to #1819 .
Edited by @jubalh.
2023-07-11 13:26:37 +02:00
Martin Dosch
e1ffc64a65
User proper ellipsis char
...
As stated in
https://github.com/profanity-im/profanity/pull/1820#issuecomment-1498083383
profanity uses "..." (three dots) in a lot of places instead the proper
ellipsis char "…".
2023-04-09 12:19:18 +02:00
Michael Vetter
a40a0f5189
Split ox functions from gpg.c to ox.c
2022-06-29 09:17:15 +02:00
MarcoPolo-PasTonMolo
719f3fbee0
Fix segfault on /ox discover
...
`/ox discover` segfaults on some misconfigured? nodes because there are
newlines before and after some pubkey-metadata stanzas so the newlines
get treated as seperate stanzas. This commit just skips each stanza in
public-keys-list that doesn't have a fingerprint.
Fixes https://github.com/profanity-im/profanity/issues/1713
2022-05-26 19:00:56 +03:00
Michael Vetter
54b57326b8
ox: have metadata node open
...
Should have been done alogn with e9f218cdf6 .
Like this people who are not in the roster can get our public key and
write messages to use.
2022-05-04 13:46:02 +02:00
Michael Vetter
0500e209a6
ox: return upon invalid fingerprint
2022-05-04 13:37:12 +02:00
Michael Vetter
7acc044a52
ox: use glib date function in _gettimestamp and fix memleak
2022-05-03 21:26:31 +02:00
Michael Vetter
e16bff2328
ox: Use connection_create_stanza_id() instead of xmpp_uuid_gen()
2022-05-03 19:54:43 +02:00
Michael Vetter
c8daee8c88
ox: use iq_id_handler_add instead of xmpp_id_handler_add
2022-05-03 18:34:07 +02:00
Michael Vetter
794bd25cd9
ox: use iq_send_stanza instead of xmpp_send
2022-05-03 18:27:20 +02:00
Michael Vetter
e9f218cdf6
ox: use pubsub acces model open when announce ox public key
2022-05-03 18:20:11 +02:00
Michael Vetter
c8b88733ef
ox: print invalid fingerprint instead of aborting
...
Asserting here is not the right thing to do at all.
A person could have a typo in the fingerprint. Or like in the case of
the reported bug just confuse the arguments.
An additional check for valid jid should be added later to the calling
function maybe.
Fix https://github.com/profanity-im/profanity/issues/1698
2022-04-27 16:30:01 +02:00
Michael Vetter
f891edc0e9
Fix typo Annonuce -> Announce
2022-04-14 09:23:12 +02:00
Michael Vetter
8173878bc7
ox: remove else case
2022-02-24 11:49:33 +01:00
Steffen Jaeckel
9cf78e59d5
auto-format
...
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de >
2022-02-01 15:01:28 +01:00
Michael Vetter
f21595597f
Format code correctly
2021-10-05 10:01:27 +02:00
DebXWoody
2a011e69ac
Bugfixes for OX implementation
...
* autocomplete for /ox discover
* fixed help description
* Implemented /ox char command
* Validated KeyID length
2021-06-28 21:28:58 +02:00
Michael Vetter
057c9ad776
Add config.h in files were it was missing
...
Related to https://github.com/profanity-im/profanity/issues/1512
2021-03-26 19:54:22 +01:00
Michael Vetter
a1a37cf9bf
ox: fix memleak in ox_announce_public_key
2021-03-25 17:02:59 +01:00
Michael Vetter
b584a1ecd0
ox: make _ox_public_key_result safer
2021-03-25 16:30:19 +01:00
Michael Vetter
10df93ee3e
ox: guard printing of fingerprint
2021-03-25 16:25:18 +01:00
Michael Vetter
fb81b80499
ox: improve error log in _ox_metadata_result
2021-03-25 16:24:07 +01:00
Michael Vetter
31a78e2629
ox: add logging prefix
2021-03-25 16:22:47 +01:00
Michael Vetter
a94378f206
Fix various typos
2020-12-10 09:24:32 +01:00
Michael Vetter
17b1b431f5
Replace stanza_get_child_by_name_and_ns with xmpp_stanza_get_child_by_name_and_ns
...
Replace our own stanza_get_child_by_name_and_ns() with the upstreamed
xmpp_stanza_get_child_by_name_and_ns() provided by the new
libstrophe/libmesode 0.10.0.
2020-09-30 19:41:08 +02:00
Michael Vetter
d7b7f54782
ox review: Use english not german
2020-07-10 13:41:48 +02:00
DebXWoody
0552e50c78
OX: XEP-0373: OpenPGP for XMPP - Version 0.5.0 (2020-06-19)
...
Discovering Public Keys via PEP
* 4.3 Discovering Public Keys of a User
* 4.4 Requesting Public Keys
* Import Public Keys into GnuPG's local keyring.
Issue: #1331
2020-07-10 13:40:00 +02:00
Michael Vetter
a2726b6a7d
Apply coding style
2020-07-07 14:18:57 +02:00
Michael Vetter
bddbfa58c0
OX: Fix tests
...
Fix:
```
/usr/bin/ld: src/xmpp/ox.o: in function `ox_announce_public_key':
src/xmpp/ox.c:90: undefined reference to `p_ox_gpg_readkey'
```
2020-07-07 14:07:38 +02:00
Michael Vetter
a4cadf78fa
Revert "Apply coding style"
...
This reverts commit 9b55f2dec0 .
Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0
Apply coding style
...
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
DebXWoody
5a17957253
OX: Announce public key on PEP
...
src/pgp/gpg.c:p_ox_gpg_readkey
Used to read a public key from a file. The function will return the fingerprint
of the file and the base64 encoded key.
src/xmpp/ox.[hc]
ox_announce_public_key(const char* const filename) can be called from the /ox
announce <filename> command. The key within the file will be pushed on PEP and
the Metadata node will be set.
Issue: #1331
2020-07-06 13:19:18 +02:00