Commit Graph
784 Commits
Author SHA1 Message Date
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
louiz’ cedf441281 Use the right int64 type for INTEGER rows in the db 2019-11-06 17:22:38 +01:00
louiz’ 05ba076a0e Use return {...} instead of make_tuple 2019-09-27 20:57:30 +02:00
louiz’ 06abd6e69a Add a missing "virtual", and remove a trivial "private" redundancy 2019-09-27 20:57:30 +02:00
louiz’ 61757e4822 Mark all rooms as non-anonymous
close #3390
2019-09-23 22:47:20 +02:00
louiz’ 3339ce2cc0 Trivial little naming changes 2019-09-23 22:17:27 +02:00
louiz’ b7b54d8f0e Trivial cleanup 2019-09-23 22:08:48 +02:00
louiz’ 7c660c3f39 Add a missing pragma once 2019-09-23 22:08:36 +02:00
louiz’ 6ab064d04d USe safer functions, gmtime_r and localtime_r 2019-09-23 22:07:57 +02:00
louiz’ 89bb886a1b Always add a 210 status in our self join presence
Because it's much much simpler than to track if we changed the nick that
was requested in the join request. And client will probably not get confused,
I hope.
2019-09-22 15:54:13 +02:00
louiz’ c13f3005e6 Use a “complete” action for the last step of ad-hoc commands instead of next 2019-09-14 11:50:21 +02:00
louiz’ f1936fdd08 Actually fix that correctly instead of the opposite 2019-09-09 22:04:54 +02:00
louiz’ 8a6d053be9 Remove trailing / of fulljids if IRC host is missing 2019-09-09 12:27:27 +02:00
louiz’ 6e30f0c194 Add an error message for udns error DNS_E_NODATA
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).
2019-08-30 11:40:42 +02:00
louiz’ 224eb9223f Properly re-convert \01ACTION into a /me when reflected to the sender
fix #3382

It still needs to be fixed properly by cleaning the way we send the messages
in all direction etc. And this is ugly because, with just one message, we do
a conversion in one direction, and then re-convert in the other
direction. But at least it works and users will be happy, even if I’m not
entirely satisfied with the code.
2019-08-25 21:58:07 +02:00
Jonas Schäfer a8ce138dd2 XEP-0410: set not-in-the-room error condition to not-acceptable
XEP-0410 demands that. This changes the error condition for all
pings to the room, even those which aren’t self-pings, if the
sender is not joined.

The conditions of XEP-0410 were based on observing existing
implementations.
2019-08-20 21:42:43 +02:00
Jonas Schäfer b68f36056d XEP-0410: implement server-side optimisation for self-pings
This prevents the ping from round-tripping through IRC and
possibly a random other client of the user. Please see XEP-0410
for the rationale.

Fixes #3385.
2019-08-20 21:42:43 +02:00
louiz’ ce7b8395d0 Add an error message on DNS resolution failure for IPv6 only 2019-07-29 23:14:47 +02:00
Jonas Schäfer 3621458d3f Do not send the IRC host directly as real JID of the user
Fixes #3381
2018-10-04 20:16:17 +02:00
Jonas Schäfer c6749ecce0 Make comment more precise 2018-10-03 20:31:50 +02:00
louiz’ 88fe1783bf Do not change our nick if we send a presence to a non-joined channel
fix #3378
2018-09-17 22:36:59 +02:00
louiz’ b9f6fbd840 Remove an unused function (and a useless debug log) 2018-08-26 18:08:14 +02:00
louiz’ 478619b10a Trivial little syntax changes 2018-08-26 15:42:38 +02:00
louiz’ 248e25c22f Replace a useless shared_ptr by a unique_ptr 2018-08-26 15:41:54 +02:00
louiz’ a3e865ad63 Fix a signed/unsigned mismatch 2018-08-24 22:49:31 +02:00
louiz’ 7d0df9b6dd Disable the throttle limit if negative
Also, invalid values result in -1 being set
2018-08-23 22:18:49 +02:00
louiz’ 6c431b64d0 Fix one more warning 2018-08-23 22:16:42 +02:00
louiz’ 8997021b2e Fix two more warnings 2018-08-23 21:28:06 +02:00
louiz’ b1564e4ddc Fix a bunch of int to unsigned int conversion warnings 2018-08-23 20:31:31 +02:00
louiz’ 0b51e38281 MaxHistoryLength now has some sensible default value if the user set a negative one 2018-08-23 20:30:11 +02:00
louiz’ d7bc737751 Add two missing ref 2018-08-23 18:54:16 +02:00
louiz’ f55b1108cd Add a missing <string> include 2018-08-23 18:54:16 +02:00
louiz’ 9fa7591058 Split the main() into smaller functions
That’s not really enough, but better
2018-08-07 20:49:34 +02:00
louiz’ 89ad479ef4 Remove a useless fill_duration member 2018-08-04 16:04:33 +02:00
louiz’ 89e038bc3a Fix the real_type of ThrottleLimit 2018-08-04 15:11:59 +02:00
louiz’ 782732ba16 Remove a bunch of useless empty lines 2018-08-04 14:50:33 +02:00
louiz’ 6a86b14d05 Rename SetDesc to set_desc, and only define it if USE_DATABASE 2018-07-27 23:06:48 +02:00
Jonas Wielicki b490ba6e56 Make SetDesc static 2018-07-27 23:06:48 +02:00
Jonas Wielicki 4953f7baa5 Fix incorrect setting of field description in Ad-Hoc config forms
The description has to be a child element of the field, not an
attribute.
2018-07-27 23:06:48 +02:00
louiz’ 7a4cea426d Reflect messages to XMPP only when they are actually sent 2018-07-24 23:16:14 +02:00
louiz’ 709fa0e5e9 Remove a useless getter 2018-07-22 14:41:32 +02:00
Romain DEP 85288fd0b3 add 'verify_certificate' as possible configuration token for policy files
This lets the user configure a per-domain certificate validation policy
2018-07-22 14:38:51 +02:00