Commit Graph
775 Commits
Author SHA1 Message Date
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
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
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
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
Jonas Schäfer f8da92a8be Always send direct messages to the user’s bare JID
This has the following advantages:

- Works while all resources are offline (persistent channels)
- Helps with combating duplicate messages when sent to different
  resources, resources going offline, carbon-copying etc. etc.

As a side effect, this also makes the MUC PMs not be MUC PMs and
always be emitted from the server-wide JID of the sending user.

Fixes #3313.
2020-09-23 23:20:47 +02:00
louiz’ b98434b5d0 In CAP messages, handle the last arg as a list of capabilities
Instead of just one. This fixes the issue of the "trailing whitespace" since we
now split it on ' '

Fix #3442
2020-08-16 16:05:15 +02:00
louiz’ df2fe0bc4b Fix the parsing of IRC messages, especially with trailing spaces 2020-08-16 16:03:11 +02:00
louiz’ 063e6b127e Handle SASL failures by displaying a message and aborting the connection 2020-08-12 09:40:36 +02:00
louiz’ 189015afb4 Conditionally compile the SASL code only with botan and database 2020-07-29 00:37:24 +02:00
louiz’ 2e1ddeb654 Implement SASL plain authentication 2020-06-15 00:18:51 +02:00
louiz’ 655bc344d4 Add a missing ostream include
Makes the build fail, on some condition.

fix #3434
2020-05-26 21:06:36 +02:00
louiz’ 10d683354b Fix clang warnings on some utils function. It’s also faster 2020-05-04 23:55:39 +02:00
louiz’ c91fac82da Fix a std::move() warning with clang 2020-05-02 21:43:48 +02:00
louiz’ 12feb1509e Fix a compile error with gcc 10
Fix #3431
2020-05-02 21:15:28 +02:00
louiz’ 2ef41e1afc Add missing affiliation and role in nick change presence
Fix #3429
2020-04-19 11:49:07 +02:00
louiz’ 212e8e5989 Merge remote-tracking branch 'linkmauve/die-gc1.0-die' 2020-03-11 18:41:43 +01:00
louiz’ 2c4ffbf25a Consider the nick change only if it is NOT a join 2020-03-11 15:27:16 +01:00
louiz’ fc22e06317 Fix a type stable-id -> stanza-id, and add a test case to be exhaustive 2020-03-11 00:32:18 +01:00
louiz’ 40d2168ae5 Announce the urn:xmpp:sid:0 NS in MUC's disco#info
As required by XEP 0359

Should fix #3369
2020-03-11 00:19:19 +01:00
louiz’ e967088986 Make sure we keep the stable-id and origin-id nodes when required
See https://xmpp.org/extensions/xep-0359.html
2020-03-11 00:13:46 +01:00
louiz’ fd98e60a1d Avoid nick changes when joining a room that was already joined
By an other resource, or anything

fix #3423
2020-03-02 23:20:54 +01:00
louiz’ 76b81cec55 Small trivial readability improvement 2020-03-02 23:20:47 +01:00
louiz’ c35e1aaa76 Merge branch 'v8' 2020-02-25 23:30:29 +01:00
louiz’ 4b0fb8b37e Remove all identd sockets on exit signal
fix #3420
2020-02-25 23:20:54 +01:00
louiz’ 9913518178 Add an error message for udns error DNS_E_NODATA (cherry-picked from master)
In cases where the DNS server does not respond “domain not found” but
“domain found, but no IP for that record type”, we just say “domain not
found” too (instead of nothing, previously).
2020-02-25 23:11:38 +01:00
louiz’ 5fbd900fd6 Ignore malformed identd queries
fix #3422
2020-02-25 23:07:26 +01:00
louiz’ 23f3f48b4a Only consider sockets that are in valid states as identd candidates
When an identd query happens, we check all the connected sockets for their
local and remote ports, to compare them with the query.  But we MUST only
consider the connected ones because:

- It doesn’t make sense to answer for a connection that has just been closed
- A non-connected sockets is not in a valid state for this (specifically
  here: its ::port attribute is empty)

fix #3421
2020-02-25 22:53:37 +01:00
louiz’ b18d81ae9f Fix a typo in a function name (match_pairt)
It’s totally harmless
2020-02-25 22:52:58 +01:00
Emmanuel Gil Peyrot 14fe971183 Don’t treat presence updates as MUC joins
If the user sends a directed presence to an unjoined MUC without a <x/>
element, send a presence error back instead of attempting to join it
again, as this is almost never what the user wants.

Fixes #3415.
2019-11-13 23:25:17 +01:00
louiz’ 7571020243 Make is_empty work with any integral type 2019-11-06 17:47:35 +01:00
louiz’ 4484a5f8ce Remove a useless std::move() and copy 2019-11-06 17:23:43 +01:00
louiz’ e4a4addaf8 Add a missing max_history_length field in the IRC server option form 2019-11-06 17:23:43 +01:00
louiz’ 34b4caeccf Properly set the default values for invalid integer conf options
fix #3372
2019-11-06 17:23:35 +01:00
louiz’ 438b7fb803 Remove a useless “givin up” debug line 2019-11-06 17:22:38 +01:00