* 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
* 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.
* 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
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.
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.
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.
See 69448b13a10a14517 / #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.