~emersion/soju

fileupload: fix http-origin pattern matching

Mirror what github.com/nhooyr/websocket does and match the host
only. Using the full URL never results in a match, because it
contains slash characters.
Add unix domain socket listeners for HTTP and WS
f5612ead — delthas 8 months ago
Automatically join a stored channel on INVITE

Some channels are typically protected with a legacy bot to which
a message is sent, causing the bot to send an INVITE to a channel,
which is invite-only.

Previously, a connect-command for sending a custom message to the
bot could be added, but there was no way to automatically accept
the invite.

This commit enables soju to automatically join a previously saved
channel when we receive an invite to it.

Examples:
- Joining #restricted, then getting disconnected from the upstream,
  sending a message to the bot, receiving an invite and accepting it
- Joining #watercooler, getting kicked, then invited again after a
  while

We eat the INVITE event so that we just transparently join the
channel without warning all downstreams.

Of course, of note is that we do *not* accept invites of
unknown/unsaved channels.

Thanks to eju for finding the issue and providing a first patch.
server: print error on getOrCreateUser failure
auth/pam: upgrade to github.com/msteinert/pam v2
upstream: fix conditional for resolveIPAddr

Oops, committed a debug change...

Fixes: f784b42346e1 ("upstream: use round-robin DNS resolution when per-user IPs are set up")
Upgrade dependencies
upstream: use round-robin DNS resolution when per-user IPs are set up

The standard library doesn't distribute connections to different
hosts. This causes issues for large deployments: the bouncer always
connects to the same IRC server, even if an IRC network has multiple
servers.

This is disabled when per-user IPs are disabled, because our resolver
implementation is very bare-bones and e.g. doesn't fallback to IPv4
when IPv6 is unavailable. Per-user IPs indicate a larger deployment
and thus a need to spread the load.

Closes: https://todo.sr.ht/~emersion/soju/221
fileupload: URL-escape output filename

If the source filename contains special characters like "%", we
would return them as-is in the final URL, and try to parse them as
a URL encoded escape sequence in the GET request.
fileupload: hardcode a few primary file extensions
fileupload: append ext to filename if missing
Ignore highlights in URLs
Wire up server logger to testing package

Allows the test tool to only display logs relevant to the test
failure at hand.
1257ab9a — Tomasz HoĊ‚ubowicz a month ago
contrib/clients: update information on ERC for Emacs
Upgrade dependencies
Upstream change for senpai
fileupload: add CORS header fields
config: validate http-origin patterns
doc: note that file uploads require an HTTP listener
4809bb40 — Moritz Poldrack 2 months ago
doc: add documentation for the file-upload key

Signed-off-by: Moritz Poldrack <git@moritz.sh>
Next