c6bc85ccd5
Merge upstream/master into merge/upstream-full
...
CI Code / Check coding style (pull_request) Failing after 5s
CI Code / Check spelling (pull_request) Successful in 15s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m29s
CI Code / Linux (arch) (pull_request) Successful in 4m38s
CI Code / Linux (debian) (pull_request) Successful in 7m25s
CI Code / Code Coverage (pull_request) Successful in 7m28s
Merge profanity-im/profanity master (373 commits) into cproof fork.
Source changes (manual merge):
- src/command/: cmd_defs, cmd_funcs, cmd_ac — upstream g_new0, auto_gchar,
launch_editor callback; keep our XEP-0308 LMC, force-encryption, CWE-134
- src/config/: preferences, tlscerts, account — upstream UNIQUE dedup,
dynamic pad capacity; keep our db_history_result_t, scroll logic
- src/database.*: upstream g_new0 memory mgmt; keep our return types,
add null-check fix for msg->timestamp
- src/omemo/, src/pgp/: upstream _gpgme_key_get_email, g_new0;
keep our replace_id in omemo_on_message_send
- src/tools/: editor, http_upload, bookmark_ignore — upstream launch_editor
callback API
- src/ui/: console, window, chatwin, mucwin, inputwin, buffer —
upstream win_warn_needed/sent dedup, PAD_MIN_HEIGHT dynamic pads;
keep our y_start_pos scroll, _truncate_datetime_suffix
- src/xmpp/: message, stanza, presence, roster_list, iq, session —
upstream connection_get_available_resources; keep our LMC stanza logic
- src/common.c: fix format-security (cons_show)
Build system:
- Makefile.am: updated test paths to subdirectory structure, added
test_cmd_ac, test_forced_encryption
- Restored autotools files deleted by upstream meson migration:
bootstrap.sh, autogen.sh, m4/ax_valgrind_check.m4, configure-debug
Tests:
- Unit tests: upstream unittests.c base + our forced_encryption tests
(482 passed, 0 failed across all 4 configurations)
- Functional tests: kept our version (93 passed, 0 failed)
upstream version requires stbbr_for_xmlns not yet in our stabber fork
- Updated test stubs: stub_xmpp.c, stub_omemo.c from upstream
Compile fixes:
- src/common.c: cons_show(errmsg) -> cons_show("%s", errmsg)
- src/database.c: null-check before msg->timestamp access
- src/ui/console.c: size_t -> (int) cast for format width
- src/config/tlscerts.c: %d -> %zu for size_t
2026-04-11 13:34:51 +03:00
Michael Vetter
189050f3f4
feat: Sanitize illegal XML characters from outgoing messages
...
Filter out control characters (U+0000 to U+001F) from outgoing
messages, as they are illegal in XML 1.0 (except for \t, \n, and \r).
This prevents XMPP servers from closing the connection when such
characters are accidentally or intentionally included in a message.
Fixes: https://github.com/profanity-im/profanity/issues/1437
2026-03-19 10:28:49 +01:00
Michael Vetter
798edce22a
chore: Move to SPDX license header
2026-03-09 12:55:37 +01:00
Michael Vetter
421bb2e261
feat: Only request receipts when supported
...
Only request delivery receipts if the recipient is known to support them
via entity capabilities
As mentioned in the recommendations of XEP-0184.
2026-03-05 20:21:47 +01:00
Michael Vetter
20154048e7
refactor: Move pgp module to gchar
2026-02-27 19:26:42 +01:00
Michael Vetter
f1acf702a9
chore: Update copyright year
2026-02-20 16:13:31 +01:00
f4405d114a
Add unit tests for forced encryption check function
CI / Check coding style (pull_request) Successful in 35s
CI / Check spelling (pull_request) Successful in 18s
CI / Linux (debian) (pull_request) Successful in 10m28s
CI / Linux (ubuntu) (pull_request) Successful in 10m51s
CI / Linux (arch) (pull_request) Successful in 13m17s
CI / Check spelling (push) Successful in 17s
CI / Check coding style (push) Successful in 33s
CI / Linux (arch) (push) Successful in 12m53s
CI / Linux (ubuntu) (push) Successful in 12m56s
CI / Linux (debian) (push) Successful in 13m4s
2025-08-27 16:48:27 +02:00
442bfb6ce1
feat: Add /force-encryption command and update message handling
...
CI / Check spelling (pull_request) Successful in 18s
CI / Check coding style (pull_request) Successful in 34s
CI / Linux (ubuntu) (pull_request) Successful in 14m5s
CI / Linux (debian) (pull_request) Successful in 14m5s
CI / Linux (arch) (pull_request) Successful in 14m53s
Implement /force-encryption command to configure forced encryption
settings with on|off and policy resend-to-confirm|block options.
The changes enhance user experience by clarifying encryption requirements
and providing actionable commands. Users can now press Enter again to
confirm unencrypted messages in resend-to-confirm mode.
2025-08-25 21:11:27 +02:00
Michael Vetter
07dfeec816
Release 0.15.0
2025-03-27 20:06:38 +01:00
Steffen Jaeckel
83a4165d92
plugins_(on|pre) API now maybe returns NULL.
...
Instead of always returning a `strdup()`'ed version, maybe return NULL and
handle this in the calling code.
This is still not true for `plugins_pre_chat_message_display()`, where we
return the passed `messag` in case there are no plugins, since this would
require a bigger refactor of more parts.
This also
* merges the implementation of `sv_ev_incoming_private_message()` and
`sv_ev_delayed_private_message()`, since they differed only by a single
line.
* untangles the `#ifdef` mess in `cl_ev_send_muc_msg_corrected()`.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu >
2025-03-12 10:15:35 +01:00
Steffen Jaeckel
848acdd1fa
Improve const correctness
...
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de >
2024-06-19 16:01:46 +02:00
Michael Vetter
569e37f018
Update copyright to 2024
2024-01-22 16:03:48 +01:00
Steffen Jaeckel
b4c088232e
Improve const correctness
...
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de >
2023-12-12 18:27:09 +01:00
Steffen Jaeckel
847a86de50
add connection_get_jid()
...
Use a singleton `Jid` inside the connection instead of always re-creating
a `Jid` from the same string.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de >
2023-12-12 18:26:21 +01:00
John Hernandez
be42ffcee9
Fix crash on quick /reconnect now usage (double free)
...
Check connection state before reconnection.
Fix #1894 https://github.com/profanity-im/profanity/issues/1894
2023-10-15 23:23:01 +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
Steffen Jaeckel
8cd53acfd7
fix /reconnect now
...
This fixes #1846
Issue introduced by a0aa26b6fa
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de >
2023-05-10 18:12:11 +02:00
Steffen Jaeckel
08d68d329b
more auto_char
...
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de >
2023-05-10 18:08:09 +02:00
Michael Vetter
3adc399da0
Update copyright year
2023-01-10 10:37:25 +01:00
Michael Vetter
585f68f4f7
Split log.c into log.c and chatlog.c
2022-06-28 20:08:38 +02:00
Michael Vetter
1330ad4e1e
Update copyright year
2022-05-09 15:43:33 +02:00
Michael Vetter
46c8245af9
Format new register code correctly
2021-10-13 21:32:44 +02:00
swirl
87d2c95c87
registration: remove auth param and excess functions
2021-08-17 14:09:48 -04:00
swirl
2cc354b6ae
fixed some bugs, added some more
...
- Added JABBER_RAW_CONNECT[ING/ED] connection states
- Added cl_ev_connect_raw and session_connect_raw to conform to normal
connection functions
- Fixed SIGABRT during registration
- Added a check in cmd_register to ensure it's actually connected before
registering--but this will always fail atm
2021-08-17 14:09:48 -04:00
Maximilian Wuttke
025c2fb1e0
Msg sending: don't write to chatwin nor to log if sending failed
...
Currently, only `chat_log_omemo_msg_out` can fail (i.e. return `NULL`
instead of a stanza id). In this case, the message is neither printed to
the chat window nor added to the log (since it wasn't sent).
2021-04-08 00:30:03 +02:00
Michael Vetter
8c08e64f37
Update copyright
2021-01-08 16:36:30 +01:00
Michael Vetter
a2726b6a7d
Apply coding style
2020-07-07 14:18:57 +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
2c94ee5a88
Feature request - XEP-0373: OpenPGP for XMPP (OX)
...
Basic implementation of XEP-0373: OpenPGP for XMPP.
https://xmpp.org/extensions/xep-0373.html
Command /ox
Issue: #1331
2020-06-29 19:05:41 +02:00
DebXWoody
c81931c35d
Cleanup defines - client_events.c
2020-06-19 22:05:31 +02:00
Dmitry Podgorny
ac410445af
Add option for legacy authentication
...
New options:
/connect <account> [auth default|legacy]
/account <account> set auth default|legacy
Fixes #1236 .
2020-06-05 11:37:51 +03:00
Michael Vetter
de8975c008
Add and use connection_get_barejid()
...
Instead of connection_get_fulljid() and then creating a Jid from it.
2020-05-25 13:04:19 +02:00
Michael Vetter
9224331df3
Fix copy paste error
2020-04-06 10:50:20 +02:00
Michael Vetter
a0a4fd0426
db: log all incoming and outgoing messages
2020-04-06 10:50:20 +02:00
Michael Vetter
def2123216
db: log outgoing message in one case
...
Not all cases covered yet.
2020-04-06 10:50:20 +02:00
Michael Vetter
a4b53550ca
Rename PROF_MSG_ENC_PLAIN to PROF_MSG_ENC_NONE
2020-04-06 10:50:20 +02:00
Michael Vetter
3aad0523d7
Always send delivery receipts if enabled
...
So far receipts are only send if we have enabled it and the other client
supports it.
But it could be that the other person is connected with several clients.
One supporting it and the other which doesn't. If the not supporting one
is active and we send to a fulljid, then we won't get receipts.
Probably it's best to just always send them if they are enabled in
Profanity. And not try to find out the capabilities of the other client.
Fix https://github.com/profanity-im/profanity/issues/1268
2020-02-14 10:17:07 +01:00
Michael Vetter
c614cc288a
Fix tests
2020-02-14 10:17:07 +01:00
Michael Vetter
50271493b7
xep-0308: remove replace_id from privwin signature
...
No `/correct` allowed in privwins
2020-02-14 10:17:07 +01:00
Michael Vetter
4ec005e4c3
xep-0308: Implement LMC for outgoing MUC messages
...
Including OMEMO encrypted ones.
Also rename `win_println_me_message()` to `win_print_outgoing_muc_msg()
as I think it's a more descriptive name.
2020-02-14 10:17:07 +01:00
Michael Vetter
66d3f572f9
xep-0308: Dont allow to correct MUC PMs
...
People could change messages of other people if the nick isn't
registered.
2020-02-14 10:17:00 +01:00
Michael Vetter
11b6e1bfa0
xep-0308: enable corrections for outgoing encrypted messages
2020-02-12 08:54:12 +01:00
Michael Vetter
b6b7dd5ad4
xep-0308: update the UI upon sending a corrected message
...
So far we don't do this for encrypted messages. Still needs to be done.
And MUC also needs to be done.
2020-02-11 15:26:58 +01:00
Michael Vetter
1118110071
xep-0308: Implement /correct to correct the last send message
...
So far the correction is sent. But the UI in Profanity itself is not
updated.
Also autocompletion for `/correct` with the last sent message is
missing.
2020-02-10 16:17:01 +01:00
Michael Vetter
be13e98fe7
Update my Copyright to 2020
2020-01-03 19:52:31 +01:00
Michael Vetter
46fd7150e5
Add vim modeline
2019-11-13 12:11:05 +01:00
Michael Vetter
aa0c638394
Update chat_log_pgp_msg_out() usage
...
Fix build
2019-10-29 15:20:24 +01:00
Michael Vetter
8c8c18c6fd
Actually log MUC PM messages
...
If I'm not mistaken MUC PMs have not been logged at all if there was no
other client sending carbons.
This should add MUC PM logging functionality.
We still need to make sure carbons log to the same file.
Regards https://github.com/profanity-im/profanity/issues/1214
2019-10-28 23:36:42 +01:00
Michael Vetter
ad9263520e
Show MUC history on intentional reconnect
...
Small bug caused by 13675fb and ce5a4ed .
Fix https://github.com/profanity-im/profanity/issues/1142
2019-07-03 09:19:24 +02:00