Shivaram Lingamneni
8798676ae9
update metadata corresponding to spec edits ( #2282 )
...
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled
* spec update: metadata keys are lowercase
* add batch parameter to metadata batches
* fix: connecting clients receive METADATA, not RPL_KEYVALUE
* spec update: send RPL_METADATASUBS in a metadata-subs batch
* move some helpers
* bump irctest to forked hash
This is https://github.com/progval/irctest/pull/314 but I don't want to
couple the merges
* fix: empty value is valid
* fix: deleting a nonexistent key gets a FAIL
2025-06-22 18:59:42 -04:00
Shivaram Lingamneni
73e51333ad
implement metadata before-connect ( #2281 )
...
* metadata spec update: disallow colon entirely
* refactor key validation
* implement metadata before-connect
* play the metadata in reg burst to all clients with the cap
* bump irctest
* remove all case normalization for keys
From spec discussion, we will most likely either require keys to be lowercase,
or else treat them as case-opaque, similar to message tag keys.
2025-06-22 13:57:46 -04:00
Shivaram Lingamneni
3b7db7fff7
round 1 of follow-up for metadata ( #2277 )
...
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled
* refactoring
* send an empty batch if necessary, as per spec
* don't broadcast no-op updates
* don't trim spaces before validating the key
* bump irctest to cover metadata
* replay existing metadata to reattaching always-on clients
* use canonicalized name everywhere
* use utils.SafeErrorParam in FAIL lines
* validate key names for sub
* fix error for METADATA CLEAR
* max-keys is enforced for channels as well
* remove unlimited configurations
* maintain the limit exactly without off-by-one cases
* add final channel registration check
2025-06-18 00:22:49 -04:00
Shivaram Lingamneni
686ce4d5b2
fix #2252
...
Fix SAREGISTER creating always-on clients with no user modes.
Also fix UNREGISTER/ERASE not deleting the stored push subscriptions.
2025-05-07 22:09:08 -04:00
Shivaram Lingamneni
4ab1a10eec
clean up redundant caching
2025-04-28 00:29:40 -04:00
Shivaram Lingamneni
54b17b0700
improve robustness of timestamp parsing ( #2250 )
...
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled
* Clamp CHATHISTORY timestamp selectors to be in [0, MaxInt64]
* Convert everything to UTC up front (probably a no-op)
2025-04-24 23:37:48 -04:00
Shivaram Lingamneni
9c3173f573
safer 005 length limits ( #2241 )
...
* Limit the payload to 380 bytes instead of 400
* Don't translate the final parameter
This leaves about 60 bytes for the server name.
2025-04-06 02:59:03 -04:00
Shivaram Lingamneni
a6df370bd9
block HTTP DoS attacks ( #2239 )
...
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled
Block uses of the JS Fetch API to send HTTP message bodies that are also valid
IRC. The constraint on such messages is that they must begin with a valid HTTP
verb; we can detect this and reject them immediately.
2025-03-30 21:33:06 -04:00
Shivaram Lingamneni
ea81ec86e1
MVP for HTTP API ( #2231 )
...
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled
Co-authored-by: Klaas Tammling <klaas@tammling.hamburg>
2025-03-18 23:13:03 -04:00
Shivaram Lingamneni
7b71839615
fix buggy persistence of push timestamps
...
getPushSubscriptions() could have a stale view of the latest subscription
renewal and successful push times. We don't want to rebuild on every renewal
or every push, so add a boolean refresh argument that controls rebuilding.
2025-01-16 00:06:11 -05:00
Shivaram Lingamneni
21ee867ebb
fix #2198 ( #2199 )
...
Add require-sasl support to KLINE / UBAN on NUH masks
2025-01-13 22:20:47 -05:00
Shivaram Lingamneni
36e5451aa5
implement draft/webpush ( #2205 )
2025-01-13 21:47:21 -05:00
Shivaram Lingamneni
efd3764337
add unique connection ID to debug logs ( #2207 )
...
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled
Fixes #2206
2025-01-11 23:07:04 -05:00
Shivaram Lingamneni
eddd4cc723
fix incorrect batch parameter in draft/extended-isupport ( #2197 )
build / build (push) Has been cancelled
ghcr / Build (push) Has been cancelled
2024-10-26 22:11:20 -04:00
Shivaram Lingamneni
7586520032
implement draft/extended-isupport ( #2184 )
2024-09-27 00:40:56 -04:00
Shivaram Lingamneni
7726160ec7
add a config switch to accept hostnames from WEBIRC
...
See #1686 ; this allows i2pd to pass the i2p address to Ergo, which may be
useful for moderation under some circumstances.
2024-04-13 21:43:41 -04:00
Shivaram Lingamneni
cab192e2af
fix #2130
...
We load registered channels unconditionally; reloading them again on rehash
is incorrect. This caused buggy behavior when channel registration was
disabled in the config, but some registered channels were already loaded.
2024-02-25 03:34:21 -05:00
Shivaram Lingamneni
75bd63d0bc
add channel autojoin feature
...
See discussion on #2077
2023-07-04 21:44:18 -04:00
Shivaram Lingamneni
0f39fde647
remove insecure reattach check
...
See #2013 ; given that plaintext is deprecated now, it seems like there is no
added value from continuing to police this.
2023-06-05 04:22:40 -04:00
Shivaram Lingamneni
7ce0636276
refactor of channel persistence to use UUIDs
2023-01-04 05:06:21 -05:00
Shivaram Lingamneni
d17faf6bcb
fix #1975
...
Provide a nondestructive stack trace dump option even when the http pprof
listener is disabled
2022-12-10 22:15:37 -08:00
Shivaram Lingamneni
ae1de2554e
add persistence broadcasting
2022-12-10 22:05:46 -08:00
Shivaram Lingamneni
893922afe0
don't report PERSISTENCE STATUS in reg burst for anonymous clients
2022-12-10 22:05:46 -08:00
Shivaram Lingamneni
99d27ff737
initial implementation of draft/persistence
2022-12-10 22:05:46 -08:00
Shivaram Lingamneni
35128bfc23
use new aligned atomic types everywhere
...
See 69448b13a1 / #1969 ; the compiler can now ensure that a uint64
intended for atomic access is always aligned to a 64-bit boundary.
Convert atomic operations on uint32s and pointers as well.
2022-08-10 02:47:39 -04:00
Shivaram Lingamneni
a99c8a42f9
remove utils.ConfigStore in favor of atomic.Pointer[T]
2022-08-03 00:59:00 -04:00
Shivaram Lingamneni
737697d1d4
exempt operators from history cutoffs
...
See #1593 ; this enables a client-side implementation of bulk deletion
2022-05-12 16:43:11 -04:00
Shivaram Lingamneni
c5579a6a34
fix #1688
...
* Add ACCEPT-tracking functionality (authorizing users to send DMs
despite +R or other applicable restrictions)
* Sending a DM automatically accepts the recipient
* Add explicit ACCEPT command
2022-05-05 22:34:43 -04:00
Shivaram Lingamneni
d5814c10ab
Merge pull request #1949 from slingamn/generic_config.2
...
genericize atomic config changes
2022-05-04 01:30:52 -04:00
Shivaram Lingamneni
077081076c
fix #1941
...
KLINE'd clients would produce a QUIT snotice without a corresponding
CONNECT snotice; explicitly suppress the QUIT snotice.
2022-05-03 13:13:29 -04:00
Shivaram Lingamneni
c603d41d08
genericize atomic config changes
2022-05-03 11:12:11 -04:00
Shivaram Lingamneni
2b8eb93c00
clean up magic numbers
2022-04-24 11:57:21 -04:00
Shivaram Lingamneni
51cdebf167
fix #1935
...
RPL_WHOISCHANNELS didn't have proper line breaks
2022-04-24 02:47:31 -04:00
Val Lorentz
379632a9e6
Fix implementation of LIST <n
2022-04-16 22:55:58 +02:00
Shivaram Lingamneni
32f7868bfd
implement draft/read-marker capability
2022-03-30 23:16:09 -04:00
Shivaram Lingamneni
0a59f41cf9
add ip-check-script.exempt-sasl
2022-01-02 01:51:31 -05:00
Shivaram Lingamneni
ed75533cb1
optionally protect against multiple starts with flock ( #1873 )
...
* optionally protect against multiple starts with flock
Fixes #1823
* use traditional .lock extension
* move config key to top level
2022-01-01 18:56:40 -05:00
Shivaram Lingamneni
c9b54ee2b8
Merge pull request #1809 from slingamn/issue1676_again.3
...
fix #1676 , take 2
2021-11-02 03:51:04 -04:00
Shivaram Lingamneni
51d573d3c9
fix #1802
...
Add a config option to suppress LUSERS
2021-11-01 04:48:31 -04:00
Shivaram Lingamneni
3ec5ffa340
Revert "fix #1676 "
...
This reverts commit 5bbee02fe6 .
2021-11-01 04:34:59 -04:00
Shivaram Lingamneni
5bbee02fe6
fix #1676
...
Fix various pagination issues with CHATHISTORY; also undo #491
(msgid munging).
2021-10-29 04:50:24 -04:00
Shivaram Lingamneni
b0f412538c
move signals code to utils/
2021-09-19 04:02:44 -04:00
Shivaram Lingamneni
2cae19dde5
remove unnecessary indirection in config
2021-09-19 02:09:43 -04:00
Shivaram Lingamneni
e0e4791f72
factor out some shared code
2021-09-18 21:28:16 -04:00
Shivaram Lingamneni
69d88fb231
update logo in /INFO response
2021-09-09 21:25:07 -04:00
Shivaram Lingamneni
26cdb4cf36
fix #1650
...
RPL_WHOISACTUALLY should display some arbitrarily chosen IP address and
hostname.
2021-08-25 22:44:55 -04:00
Shivaram Lingamneni
5fc7ac41da
always mark the service ready after rehash
2021-07-04 19:51:35 -04:00
Shivaram Lingamneni
364193df4e
refactor some start-stop logging
2021-07-04 17:58:48 -04:00
Shivaram Lingamneni
6f24082705
support systemd notifications
...
Fixes #1733
2021-07-04 07:41:59 -04:00
Shivaram Lingamneni
4910aefa37
use ergochat/irc-go instead of goshuirc/irc-go
2021-06-18 02:43:25 -04:00