Kim Alvefur
3180f48bc5
mod_http_errors: Add some silly variations for the '/' page
...
> "You can do anything in XMPP!"
> as a reminiscence of zombo.com
-- jonas’
> A study in simplicity.
Prosody tagline
5 years ago
Kim Alvefur
0a5ac437b9
mod_http_file_share: Fix traceback on missing file-type
...
attempt to index a nil value (local 'filetype') casued by the :gsub call
5 years ago
Kim Alvefur
40252c2cc7
mod_csi_simple: Add command to test importance algorithm on stream of stanzas
...
This won't include behavior provided by extra modules tho.
5 years ago
Kim Alvefur
4ed5700a19
mod_http: Improve message for missing 'route'
...
This was the late night early draft text, thought I had amended this but
apparently I forgot.
5 years ago
Kim Alvefur
19eb907613
mod_http: Warn if app is missing 'route'
...
Makes no sense to have a http module with no handlers
Would have helped me when I accidentally
module:provides("http", {
GET = handler;
})
5 years ago
Kim Alvefur
b01915e81c
mod_http_file_share: Allow credentials via CORS (needed for auth token)
5 years ago
Kim Alvefur
d65d38846d
mod_http: Allow modifying CORS header list via :provides API
...
E.g.
module:provides("http", {
cors = {
headers = {
Accept = true;
Expect = false;
};
};
route = { ... };
});
Case might be weird.
6 years ago
Kim Alvefur
5d4446cd13
mod_http: Allow setting the CORS credentials flag via :provides API
...
E.g.
module:provides("http", {
cors = {
credentials = true;
};
route = { ... };
});
6 years ago
Kim Alvefur
24974dc1c6
mod_http_errors: Style tweak
...
Weird to have the background all the way to the edge of the viewport.
Would be nice if this could be done without the extra span.
5 years ago
Kim Alvefur
900fe6a1cb
mod_http_file_share: Return a message from the base URL
5 years ago
Kim Alvefur
49d6a7a91f
mod_websocket: Use mod_http_errors html template #1172
...
Same as the prior commit to mod_bosh
5 years ago
Kim Alvefur
d18348b578
mod_bosh: Include warning if endpoint accessed insecurely ( #1172 )
...
This is to make it obvious if a misconfigured a proxy or the request
really is insecure.
Perhaps it should also check c2s_require_encryption?
5 years ago
Kim Alvefur
5860017b9f
mod_bosh: Use message template from mod_http_error
...
Looking Good!
And most importantly, consistent.
5 years ago
Kim Alvefur
ba8610666a
mod_http_errors: Add a highlighted warning to template
...
It looks sooooo good!
Meant to be used by e.g. mod_bosh to warn in case the request is
considered insecure.
5 years ago
Kim Alvefur
6d29fa653c
mod_http_errors: Add way to reuse the error page template
...
module:fire_event("http-message", {title = "hello"; message = "world"})
Goal is to enable consistent messages from Prosody. Not necessarily
error messages, but warnings or just notices.
This does cause some drift in the purpose of mod_http_errors, but that's
okay.
5 years ago
Kim Alvefur
699e27da56
mod_http_errors: Minify CSS
...
Because It looks too big in view source!
5 years ago
Kim Alvefur
e52a77ff84
mod_http: Fix trusted proxies check (thanks buildbot)
...
is_trusted_proxy() is only in trunk, I dun goofed when I rebased
8603011e51fe from trunk.
5 years ago
Kim Alvefur
80116bf0e3
mod_http: Skip IP resolution in non-proxied case
...
Skips doing the whole get_ip_from_request() dance if the request isn't
from a proxy at all, even if the client sent the header for some reason.
5 years ago
Kim Alvefur
0e6a6fff96
mod_http: Optimize proxy IP check
...
No need to do a subnet match comparison to see if two IP addresses match
exactly.
5 years ago
Kim Alvefur
231e87ab05
mod_websocket: Inherit security status from http request
...
Allows requests considered secure becasue of a proxy header to carry
over to the client session.
mod_bosh does this too.
5 years ago
Kim Alvefur
362c228c47
mod_http: Consider x-forwarded-proto from trusted proxies
...
Should be better than setting consider_{bosh,websocket}_secure as that
may end up causing actually insecure requests to be considered secure.
Doing it here, as with IP, should make this apply to all HTTP modules.
5 years ago
Kim Alvefur
51b055809a
mod_csi_simple: Fire event when flushing queue
...
To let other plugins know and take some action, e.g. flushing other
buffers or whatnot.
5 years ago
Kim Alvefur
dcab373f45
mod_csi_simple: Set session state to 'flushing' while doing so
...
May be useful for 3rd party modules.
5 years ago
Kim Alvefur
f01247ec56
mod_pep: Advertise base pubsub feature ( fixes #1632 )
...
Noticed while discussing feature discovery in Gajim
Thanks lovetox
5 years ago
Kim Alvefur
3151984042
mod_http_file_share: Prevent attempt to upload again after completion
5 years ago
Kim Alvefur
9501c7b976
mod_http_file_share: Support sending 100 Continue
...
E.g. curl will ask for this when sending large uploads. Removes a delay
while it waits for an error or go-agead.
5 years ago
Kim Alvefur
db3c36c69d
mod_s2s: Fix copypaste mistake in b3ae48362f78
...
Directly sending something over s2s needs to use sends2s() but the code
copied from mod_c2s had .send()
5 years ago
Matthew Wild
4bceaa2443
MUC: Fix logic bug causing unnecessary presence to be sent, fixes #1615 (thanks damencho)
5 years ago
Kim Alvefur
f4c821cc4a
mod_s2s: Prevent whitespace keepalives the stream has been opened
...
This will result in the stream timing out instead, which is probably
correct if the stream has not been opened yet.
This was already done for c2s in e69df8093387
Thanks Ge0rG
5 years ago
Kim Alvefur
15b64ea4ff
mod_saslauth: Only advertise channel binding if a finished message is available
...
In some cases this method returns nothing, unclear why.
5 years ago
Kim Alvefur
b62216fab3
mod_saslauth: Disable 'tls-unique' channel binding with TLS 1.3 ( closes #1542 )
...
The 'tls-unique' channel binding is undefined in TLS 1.3 according to a
single sentence in parenthesis in Apendix C of RFC 8446
This may trigger downgrade protection in clients that were expecting
channel binding to be available.
5 years ago
Kim Alvefur
63f44f3640
mod_pubsub: Fix notification stanza type setting ( fixes #1605 )
5 years ago
Kim Alvefur
ce3e3808f5
mod_pubsub: Lower priority of default <body> generator
...
in order to avoid conflict with a handler at the default (0) priority,
making it easier to write your own formatting in plugins.
this follows the common pattern of default modules having lower priority
5 years ago
Kim Alvefur
cd1aadb52e
mod_s2s: Clarify comment about unused TLS settings
...
Ref 115b5e32d960
5 years ago
Kim Alvefur
196c9f070e
mod_admin_shell: Add help section with (top level) MUC commands
...
These were previously only documented on the site.
5 years ago
Kim Alvefur
ca39262991
mod_admin_shell: Pretty-print HTTP endpoints in a human table
...
Attempted readability improvement
5 years ago
Kim Alvefur
bdb5e39f5c
mod_admin_shell: Remove previous print() call
...
Accident involving Mercurial interactive commit
5 years ago
Kim Alvefur
d8d5ad3bea
mod_admin_shell: List modules providing each HTTP endpoint
5 years ago
Kim Alvefur
a64ae4e8d5
mod_admin_shell: List global HTTP endpoints by default
...
Trick copied from the module commands
5 years ago
Kim Alvefur
2845337d4b
mod_c2s: Reflect stream 'from' attribute back if set ( fix #1625 )
...
Clients should *not* be setting this before TLS anyways.
5 years ago
Kim Alvefur
cdbb77ccbf
mod_http_file_share: Collect cache hit/miss statistics for downloads
5 years ago
Kim Alvefur
e45dee37bd
mod_http_file_share: Measure how long it takes to prune expired files
5 years ago
Kim Alvefur
da5cd9c963
mod_http_file_share: Collect statistics of files uploaded
5 years ago
Kim Alvefur
0f0d32d335
mod_storage_sql: Implement map-like API for archives
...
Used by mod_http_file_share, muc moderation, etc.
Tests tweaked because they failed on stanza internals that happen
becasue of re-serialization. Namespaces differ since inheritance is
implicit when building but explicit after parsing.
5 years ago
Kim Alvefur
8711e2bedc
adhoc.lib: Tweak to allow using util.error objects
...
Since util.stanza supports util.error objects via duck-typing and adhoc
errors look enough like util.error objects, they should able to pass as
such. This will allow converting adhoc commands to use util.error.
5 years ago
Kim Alvefur
5d9802727b
mod_http_file_share: Reorder arguments
...
'filetype' is optional, so having it last seems sensible.
'slot' is pretty important, so moving it earlier seems sensible.
5 years ago
Kim Alvefur
f5baa83714
mod_http_file_share: Update cached value while it is reasonably fresh
...
This should ensure that cache entries until the oldest file that counted
to the last 24h becomes older than 24h.
5 years ago
Kim Alvefur
864708efb7
mod_http_file_share: Cache quotas to avoid hitting storage
5 years ago
Kim Alvefur
855542e2ca
mod_http_file_share: Split out some variables for later reuse
5 years ago
Kim Alvefur
4d3ffbf0f7
mod_http_file_share: Add support for daily upload quotas.
...
Daily instead of total quotas, should be more efficient to calculate.
Still O(n), but a smaller n. Less affected by total retention period.
5 years ago