Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Back out 6dde2c9fa272: Doesn't work on Lua 5.1 | Kim Alvefur | 2020-10-15 | 1 | -13/+6 |
| | |||||
* | util.strbitop: Remove redundant init function | Kim Alvefur | 2020-10-15 | 1 | -4/+0 |
| | | | | | When you have 3 almost identical functions, you tend to edit one and then copypaste. Forgot to remove this line from the other two. | ||||
* | util.strbitop: Create buffer in the correct size (optimization) | Kim Alvefur | 2020-10-15 | 1 | -6/+13 |
| | | | | | This avoids dynamically growing the buffer as Lua does when luaL_addchar is used, thus saving on realloc calls. | ||||
* | util.strbitop: Add tests covering basics | Kim Alvefur | 2020-10-15 | 1 | -0/+41 |
| | | | | Also as docs | ||||
* | util.strbitop: Reformat code | Kim Alvefur | 2020-10-15 | 1 | -9/+9 |
| | | | | | | | | | | | | | | astyle \ --indent=tab \ --attach-classes \ --indent-switches \ --break-blocks \ --pad-oper \ --unpad-paren \ --add-braces \ --align-pointer=name \ --lineend=linux \ *.c | ||||
* | net.websocket.frames: Add test for empty frame with MASK and key set | Matthew Wild | 2020-10-15 | 1 | -0/+10 |
| | |||||
* | net.websocket.frames: Use C string XOR implementation | Kim Alvefur | 2020-10-14 | 2 | -24/+8 |
| | |||||
* | util.strbitop: Library for bitwise operations on strings | Kim Alvefur | 2019-09-07 | 3 | -2/+93 |
| | |||||
* | net.websocket.frames: Add small test covering xor-masking | Kim Alvefur | 2020-10-14 | 1 | -0/+13 |
| | | | | This is basically a recording of current behavior, to detect changes. | ||||
* | net.http.server: Don't send Content-Length on 1xx/204 responses, per RFC ↵ | Matthew Wild | 2020-10-13 | 1 | -1/+4 |
| | | | | (fixes #1596) | ||||
* | net.websocket.frames: Read buffer length correctly in Lua 5.1 (fix #1598) | Kim Alvefur | 2020-10-12 | 1 | -3/+3 |
| | | | | | | | COMPAT: The __len metamethod does not work with tables in Lua 5.1. Both strings and util.dbuffer now expose their length as a :len() method. | ||||
* | util.dbuffer: Expose length as :len() method, like strings | Kim Alvefur | 2020-10-12 | 2 | -0/+2 |
| | | | | Ref #1598 | ||||
* | MUC: Preserve disco 'node' attribute (or lack thereof) in response (fix ↵ | Kim Alvefur | 2020-10-07 | 1 | -2/+2 |
| | | | | #1595) (thanks lessthan3) | ||||
* | util.dependencies: Check for bitop library same way as net.websocket.frames ↵ | Kim Alvefur | 2020-10-05 | 1 | -1/+1 |
| | | | | (fixes #1594) | ||||
* | MUC: Correct advertising of subject write access (really fixes #1155) | Kim Alvefur | 2020-10-04 | 1 | -2/+2 |
| | | | | | | | | | | Thanks pep. and lovetox XEP-0045 §6.4: > any field defined for the muc\#roomconfig FORM_TYPE can be included in > the extended service discovery fields Probably happened because the same mistake is in #1155 | ||||
* | mod_bosh: Ensure that stream is directed to a VirtualHost (fixes #425) | Kim Alvefur | 2020-10-03 | 1 | -0/+16 |
| | |||||
* | mod_bosh: Pick out the 'wait' before checking it instead of earlier | Kim Alvefur | 2020-10-03 | 1 | -1/+2 |
| | | | | | Going to add more host related checks, so to keep the wait variable closer to the related checks | ||||
* | Added tag 0.11.7 for changeset ece430d49809 | Matthew Wild | 2020-10-01 | 0 | -0/+0 |
| | |||||
* | mod_c2s,mod_s2s: Make stanza size limits configurable | Kim Alvefur | 2020-05-31 | 2 | -2/+4 |
| | |||||
* | Merge | Matthew Wild | 2020-09-30 | 5 | -85/+434 |
|\ | |||||
| * | mod_websocket: Refactor frame validity checking, also check ↵ | Matthew Wild | 2020-09-29 | 1 | -77/+95 |
| | | | | | | | | partially-received frames against constraints | ||||
| * | net.websocket.frames: Additionally return partial frame if there is one | Matthew Wild | 2020-09-29 | 1 | -1/+1 |
| | | |||||
| * | mod_websocket: Continue to process data already in the buffer after an error ↵ | Matthew Wild | 2020-09-28 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | occurs Previously any error, or even a normal websocket close frame, would return early, leaving potentially entire frames in the buffer unprocessed and then discarded. This change stops processing new data, but returns an existing processed data up to the point of the error/close. | ||||
| * | mod_websocket: Enforce stanza size limit and close stream | Matthew Wild | 2020-09-17 | 1 | -0/+4 |
| | | |||||
| * | mod_websocket: Add separate limit for frame buffer size | Matthew Wild | 2020-09-17 | 1 | -2/+2 |
| | | |||||
| * | mod_websocket: handle full frame buffer and raise stream error | Matthew Wild | 2020-09-17 | 1 | -1/+5 |
| | | |||||
| * | mod_websocket: Switch partial frame buffering to util.dbuffer | Matthew Wild | 2020-09-17 | 2 | -5/+10 |
| | | | | | | | | | | This improves performance and enforces stanza size limits earlier in the pipeline. | ||||
| * | net.websocket.frames: Allow all methods to work on non-string objects | Matthew Wild | 2020-09-17 | 1 | -10/+15 |
| | | | | | | | | | | | | | | | | Instead of using the string library, use methods from the passed object, which are assumed to be equivalent. This provides compatibility with objects from util.ringbuffer and util.dbuffer, for example. | ||||
| * | util.dbuffer: Simplify test case | Kim Alvefur | 2020-08-24 | 1 | -0/+130 |
| | | | | | | | | | | | | | | | | | | An earlier theory involved the bug being related to collapsing multiple items, so it exercised that too. Also correct the comment, it referred to the space in "hello world" in an earlier version before the test string was changed to "foobar", which was what was tested in a REPL | ||||
| * | util.dbuffer: Fix :sub() not working with partially-consumed chunks (thanks ↵ | Matthew Wild | 2020-08-24 | 1 | -0/+176 |
| | | | | | | | | | | | | Zash for test case) This also appears to fix some bugs with chunk-encoded streams in net.http.parser. | ||||
| * | util.dbuffer: dynamic string buffer | Matthew Wild | 2020-06-26 | 1 | -0/+7 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to util.ringbuffer (and shares almost identical API). Differences: - size limit is optional and dynamic - does not allocate a fixed buffer of max_size bytes - focus on simply storing references to existing string objects where possible, avoiding unnecessary allocations - references are still stored in a ring buffer to enable use as a fast FIFO Optional second parameter to new() provides the number of ring buffer segments. On Lua 5.2 on my laptop, a segment is ~19 bytes. If the ring buffer fills up, the next write will compact all strings into a single item. | ||||
* | | util.indexedbheap: Fix heap datastructure corruption in ↵ | Waqas Hussain | 2020-09-29 | 2 | -1/+34 |
|/ | | | | :reschedule(smaller_value) | ||||
* | util.startup: Configure the GC on startup, using the config or built-in defaults | Matthew Wild | 2020-06-15 | 1 | -0/+17 |
| | |||||
* | util.gc: Linter fixes [luacheck] | Matthew Wild | 2020-06-15 | 1 | -2/+1 |
| | |||||
* | util.gc: New module for configuring the Lua garbage collector | Matthew Wild | 2020-06-15 | 1 | -0/+50 |
| | |||||
* | net.http: Add feature discovery (currently just contains SNI) | Matthew Wild | 2020-09-15 | 1 | -0/+3 |
| | |||||
* | net.server: Backport client parts of SNI support from trunk (#409) | Kim Alvefur | 2020-08-17 | 4 | -16/+42 |
| | | | | | | | | | | Partial backports of the following commits from trunk: 6c804b6b2ca2 net.http: Pass server name along for SNI (fixes #1408) 75d2874502c3 net.server_select: SNI support (#409) 9a905888b96c net.server_event: Add SNI support (#409) adc0672b700e net.server_epoll: Add support for SNI (#409) d4390c427a66 net.server: Handle server name (SNI) as extra argument | ||||
* | Added tag 0.11.6 for changeset bacca65ce107 | Matthew Wild | 2020-09-09 | 0 | -0/+0 |
| | |||||
* | mod_s2s: Escape invalid XML in loggin (same way as mod_c2s) fix #1574 | Kim Alvefur | 2020-08-01 | 1 | -2/+1 |
| | |||||
* | net.http: Add request:cancel() method | Matthew Wild | 2020-08-08 | 1 | -0/+11 |
| | | | | | | | | | | This is a new API that should be used in preference to http.destroy_request() when possible, as it ensures the callback is always called (with an error of course). APIs that have edge-cases where they don't call callbacks have, from experience, shown to be difficult to work with and often lead to unintentional leaks when the callback was expected to free up certain resources. | ||||
* | net.http: Re-expose destroy_request() function | Matthew Wild | 2020-08-08 | 1 | -0/+1 |
| | | | | | This was accidentally turned private in 647adfd8f738 as part of refactoring for Lua 5.2+. | ||||
* | net.resolvers.basic: Default conn_type to 'tcp' consistently if unspecified ↵ | Matthew Wild | 2020-07-10 | 1 | -1/+2 |
| | | | | | | (thanks marc0s) Fixes a traceback when passed an IP address with no conn_type. | ||||
* | net.http: Fix traceback on invalid URL passed to request() | Matthew Wild | 2020-07-07 | 1 | -2/+3 |
| | |||||
* | net.http.server: Fix reporting of missing Host header | Kim Alvefur | 2020-06-23 | 1 | -1/+2 |
| | | | | | The "Missing or invalid 'Host' header" case was dead code previously because `host` was always at least an empty string. | ||||
* | net.http.server: Strip port from Host header in IPv6 friendly way (fix #1302) | Kim Alvefur | 2020-06-23 | 1 | -1/+1 |
| | | | | | E.g. given `[::1]:5280` it would previously result in only `[` instead of the correct `[::1]` | ||||
* | util.startup: Remove duplicated initialization of logging (fix #1527) | Kim Alvefur | 2020-06-22 | 1 | -1/+0 |
| | |||||
* | mod_muc_mam: Don't strip MUC <x> tags, fix #1567 | Kim Alvefur | 2020-06-21 | 1 | -3/+0 |
| | |||||
* | mod_auth_internal_*: Apply saslprep to passwords | Kim Alvefur | 2020-05-23 | 3 | -2/+25 |
| | | | | Related to #1560 | ||||
* | util.sasl.plain: Apply saslprep to stored password | Kim Alvefur | 2020-05-22 | 1 | -1/+1 |
| | | | | | | Fixes something like #1560 here too. The password sent by the user already had saslprep applied. | ||||
* | util.sasl.scram: Apply saslprep before hashing password, fixes #1560 | Kim Alvefur | 2020-05-22 | 1 | -0/+4 |
| |