Commit Graph
805 Commits
Author SHA1 Message Date
Stephen Paul Weber d8bc3d17bb IRC nicks cannot contain spaces
Rather than trying and hoping the server gives a proper failure, just
fail early and avoid the whole mess. Some servers will instead send
messages to the user, etc, which is not very helpful.
2026-09-23 21:58:20 -05:00
Stephen Paul Weber 99d7f8a41a Do not send NICK command when nick not changed
If we get a presence, that is not always a nick change. Don't bother the
IRC server with a command to change the nick if we're not changing it.
2026-09-23 21:57:29 -05:00
Stephen Paul Weber ff173a8ea3 Memory fixes 2026-09-23 21:12:31 -05:00
Stephen Paul Weber 32485f0593 Merge branch 'user/luca/iq-gateway' of https://codeberg.org/aninternettroll/biboumi
* 'user/luca/iq-gateway' of https://codeberg.org/aninternettroll/biboumi:
  Add support for XEP-0100 jabber:iq:gateway
2026-09-23 10:49:01 -05:00
Stephen Paul Weber 9fad5ad426 Memory safety fix 2026-09-23 10:40:07 -05:00
Stephen Paul Weber e47b0a92e1 Merge branch 'user/luca/xmpp-caps' of https://codeberg.org/aninternettroll/biboumi
* 'user/luca/xmpp-caps' of https://codeberg.org/aninternettroll/biboumi:
  Don't hardcode ver, update node name, and add tests
  Allow disco queries with a node (needed for CAPS)
  Add gateway/irc and caps
2026-09-23 10:40:00 -05:00
Stephen Paul Weber 3c969bc1d1 Merge https://codeberg.org/poezio/biboumi
* https://codeberg.org/poezio/biboumi: (65 commits)
  build: fix wrong constextpr preventing some compilers from building biboumi
  database: various optimizations for SQLite and PostgreSQL
  doc(admin): format verify_certificate documentation into a list
  Fix RPM builds on Fedora Linux
  Systemd service dir is  /usr/lib/systemd/system
  cmake: Explicitly search for Catch2 version 3
  add CAP LS 302 support and max-lines support for draft/multiline messages
  install files using GNUInstallDirs
  change to direct /doc/
  Fix link to documentation
  fix multiline private messages
  add archive_expires_after option
  Fix documentation warnings
  fix fedora package
  add ctest support and remove absolute path from etc directory
  Rename Ports to Unencrypted ports
  build docker image from local files, not git clone
  update some version strings
  add default_persistence_allowed
  add persist_user_denylist and persist_user_allowlist
  ...
2026-09-23 09:59:13 -05:00
Luca Matei Pintilie df83dd19ae Don't hardcode ver, update node name, and add tests 2026-08-19 21:30:27 +02:00
mathieui a261848ef4 build: fix wrong constextpr preventing some compilers from building biboumi
The latest commit introduced an issue because a std::string cannot
really be constexpr. Fortunately, a cosnt char* const works just as well
here.
2026-08-02 19:37:44 +02:00
Stephen Paul Weber 567b139e1c Allow disco queries with a node (needed for CAPS) 2026-08-02 18:13:39 +02:00
Luca Matei Pintilie dbafe37e13 Add support for XEP-0100 jabber:iq:gateway 2026-08-02 18:12:11 +02:00
Stephen Paul Weber a9dae0621a Add gateway/irc and caps 2026-08-01 00:15:06 +02:00
Luca Matei Pintilie ad14748a30 database: various optimizations for SQLite and PostgreSQL 2026-07-21 01:16:49 +02:00
Luca Matei Pintilie bf958d0e34 add CAP LS 302 support and max-lines support for draft/multiline messages 2026-01-13 19:20:46 +01:00
Luca Matei Pintilie c15a057885 fix multiline private messages 2026-01-10 19:02:48 +01:00
Luca Matei Pintilie 6ed185a8a5 add archive_expires_after option 2026-01-10 18:59:34 +01:00
Link Mauve 0d714c2c0d Rename Ports to Unencrypted ports
This makes it clear that these ports are specified to connect without
TLS, and hopefully lead to people using TLS ports instead by default.
2026-01-10 18:54:54 +01:00
Luca Matei Pintilie 51930c1e78 add default_persistence_allowed
In addition set all config options in every test, as catch2 can run
tests out of order and as demonstrated in
e1ad60af4f this can be an issue
2025-11-28 21:54:38 +01:00
Luca Matei Pintilie fbb93dbd08 add persist_user_denylist and persist_user_allowlist
Closes: #3511
2025-11-28 21:54:38 +01:00
Luca Matei Pintilie f2a55c4f27 fix multiline tests 2025-11-28 20:30:12 +01:00
Luca Matei Pintilie 6993577cbe fix mode tests 2025-11-28 20:30:12 +01:00
Luca Matei Pintilie 7bc27b21e6 fix tests 2025-11-28 20:30:12 +01:00
Benjamin Graillot d13f66ab90 Add support for IRCv3 message-tags Implement draft/multiline 2025-11-28 20:30:12 +01:00
Luca Matei Pintilie 979ba96cb0 Update to ergo 2.15+ 2025-10-12 18:01:47 +02:00
poVoq 814bb67df8 Fix disco for IRC servers
They should not advertise that they are MUCs since they are not.

Backport from: https://git.sr.ht/~singpolyma/biboumi/commit/764878fb0f357ec42b59b58d199fe2d5a046f998
2025-10-12 17:50:25 +02:00
Luca Matei Pintilie 9c92f7ce4a Bounce message corrections
On IRC it is confusing when an XMPP user "corrects" a message, but on
the other side a new message is sent. To prevent spam and confusion, do
not allow message corrections at all, and instead return an error if
attempted.

Fixes: #3436
Fixes: #3480
2025-10-12 17:48:33 +02:00
Link Mauve 7cd4e06f84 Support all allowed channel prefixes
RFC 2812 specifies in §1.3 that “Channels names are strings (beginning
with a '&', '#', '+' or '!' character) of length up to fifty (50)
characters.”

We previously only allowed the first two prefix characters, or any other
one if the server overrides the list with ISUPPORT.
2025-07-29 16:04:36 +02:00
Luca Matei Pintilie e4d32f9392 biboumi: Update botan to version 3
The botan dependency has introduced a number of breaking changes with
version 3, a couple of which impact biboumi as well

This patch makes biboumi compatible with botan 3 and drops support for
botan 2 at the same time

As a consequence of the botan dependency update, C++ version has to be
upgraded to C++ 20

https://botan.randombit.net/handbook/migration_guide.html
2025-07-29 15:53:20 +02:00
Luca Matei Pintilie 8c4769e27b Revert "Replace a useless shared_ptr by a unique_ptr"
This reverts commit 248e25c22f.

In preparation for the botan 3 update `IrcClient` must be made into a
`shared_ptr`, which will then allow us to pass a `shared_ptr` of
callbacks to `Botan::TLS::Client`
2025-07-29 15:52:16 +02:00
poVoq fc0312b272 Fix WEBIRC for IRC servers like Ergo 2025-04-17 18:53:25 +00:00
Stephen Paul Weber 764878fb0f Fix disco for IRC servers
They should not advertise that they are MUCs since they are
not
2024-11-19 11:38:53 -05:00
Stephen Paul Weber f6d336e0f2 Merge branch 'master' of https://git.louiz.org/biboumi
* 'master' of https://git.louiz.org/biboumi:
  Follow-up of the previous on: also catch that on recv events
  Catch all botan exception when sending data, not just TLS
2024-01-24 09:52:17 -05:00
Emmanuel Gil Peyrot 2bd91dcf6f Replace inexistant lightmagenta CSS colour with hotpink
This improves compatibility with clients respecting the CSS
specification.

Thanks PulkoMandy, who found it using libcss in Renga!
2023-10-06 11:04:05 +02:00
Florian Schmaus 049da90ded utils/sha1.cpp: add missing <cstdint> include
Fixes compilation with GCC 13.

Downstream Gentoo bug: https://bugs.gentoo.org/902471

Signed-off-by: mathieui <mathieui@mathieui.net>
2023-10-06 00:10:46 +02:00
louiz’ 0061298dd0 Do not use ':' as a namespace separator with expat
Instead use \1, and build our own nodes by explicitely separating the
namespace and the node name.
2022-03-10 23:23:47 +01:00
Stephen Paul Weber 1222335406 Fix caps hash 2022-03-07 23:05:08 -05:00
Stephen Paul Weber e20bf15b7a Allow disco queries with a node (needed for CAPS) 2022-03-07 23:01:37 -05:00
Stephen Paul Weber e0c50dd99a Add gateway/irc and caps 2022-03-07 22:41:44 -05:00
louiz’ 18b6006e30 Follow-up of the previous on: also catch that on recv events
fix #3460
2021-11-22 12:34:15 +01:00
louiz’ b49594ea3e Catch all botan exception when sending data, not just TLS
On invalid ASN1 file or things that are not specific to TLS only, botan
throws other exceptions, and we need to catch those as well.

fix #3460
2021-11-22 12:15:38 +01:00
Stephen Paul Weber f14752b06f muc-bridge users should never persist 2021-06-23 22:55:59 -05:00
Stephen Paul Weber 6de22e8320 fix build 2021-06-23 22:55:49 -05:00
louiz’ 80c5a0e150 Use recipient-unavailable when we are not connected to the IRC server
Instead of remote-server-not-found

See #3427
2021-01-15 12:34:30 +01:00
louiz’ a4512cd3ae sasl: Use the nick from the presence if the ad-hoc one is not set
fix #3450
2021-01-15 12:33:18 +01:00
louiz’ fdb3e739b0 Typos: negociat… -> negotiat… 2021-01-09 22:06:33 +01:00
louiz’ 752931b7a5 fix localtime call -> _r 2020-12-28 23:43:13 +01:00
louiz’ 5607c101d4 Little code simplification for conf_filename 2020-09-23 23:55:50 +02:00
Félix Baylac-Jacqué 0bb4f144fc CLI: Add a test config flag
Adding a -t configuration flag that will make biboumi check the
configuration file syntax.

Such a syntax check is handy for some deployment tools. It helps the
tooling to statically analyse the configuration file and prevent
unecessesary deployments when the configuration file is clearly
incorrect.

Updating the synopsis with this new flag.
2020-09-23 23:55:50 +02:00
louiz’ 9cb6a0c2c9 Entirely remove the code for the “preferred_from” nick
Since private messages are now always coming from the server-wide JIDs
2020-09-23 23:38:46 +02:00
Georg Lukas 9a90c76eba Do not mark message to bare JID private/no-copy 2020-09-23 23:20:47 +02:00