Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge 0.12->trunk | Matthew Wild | 2022-10-31 | 1 | -4/+11 |
|\ | |||||
| * | mod_http: Allow disabling CORS in the http_cors_override option and by default | Matthew Wild | 2022-10-31 | 1 | -4/+11 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #1779. Due to an oversight in the logic, if the user set 'enabled' to false in an override, it would disable the item's requested CORS settings, but still apply Prosody's default CORS policy. This change ensures that 'enabled = false' will now disable CORS entirely for the requested item. Due to the new structure of the code, it was necessary to have a flag to say whether CORS is to be applied at all. Rather than hard-coding 'true' here, I chose to add a new option: 'http_default_cors_enabled'. This is a boolean that allows the operator to disable Prosody's default CORS policy entirely (the one that is used when a module or config does not override it). This makes it easier to disable CORS and then selectively enable it only on services you want it on. | ||||
* | | Merge 0.12->trunk | Kim Alvefur | 2022-10-24 | 1 | -1/+5 |
|\| | |||||
| * | mod_admin_shell: Ensure available connection for column 'secure' | Kim Alvefur | 2022-10-23 | 1 | -1/+1 |
| | | | | | | | | Similar to #1777 | ||||
| * | mod_admin_shell: Ensure connection exists to get port from (fixes #1777) | Kim Alvefur | 2022-10-23 | 1 | -1/+5 |
| | | |||||
* | | util.prosodyctl.cert: Remove Lua 5.1 os.execute() return value compat | Kim Alvefur | 2022-10-20 | 1 | -1/+1 |
| | | |||||
* | | util.prosodyctl: Remove Lua 5.1 os.execute() return value compat | Kim Alvefur | 2022-10-20 | 1 | -2/+1 |
| | | |||||
* | | util.openssl: Remove Lua 5.1 os.execute() return value compat | Kim Alvefur | 2022-10-20 | 1 | -2/+1 |
| | | |||||
* | | util.human.io: Fix handling of os.execute() return values in Lua 5.2+ | Kim Alvefur | 2022-10-20 | 1 | -3/+3 |
| | | | | | | | | Wrong part of Lua 5.1 compat removed in 0f4feaf9ca64 | ||||
* | | util.mathcompat: Module to ease reuse of math.type() | Kim Alvefur | 2022-10-20 | 7 | -10/+41 |
| | | | | | | | | | | Mostly to ensure it is available during tests, as util.startup is not invoked there | ||||
* | | util.startup: Provide a common Lua 5.3+ math.type() for Lua 5.2 | Kim Alvefur | 2022-10-19 | 4 | -9/+17 |
| | | | | | | | | Code deduplication | ||||
* | | Merge 0.12->trunk | Kim Alvefur | 2022-10-20 | 1 | -1/+1 |
|\| | |||||
| * | util.startup: Ensure import() is available in prosodyctl (thanks keyzer) | Kim Alvefur | 2022-10-20 | 1 | -1/+1 |
| | | | | | | | | | | Fixes error in mod_authz_internal due to import() being unavailable as it was only loaded in Prosody proper | ||||
* | | util.smqueue: Improve tests | Kim Alvefur | 2022-10-19 | 1 | -0/+3 |
| | | | | | | | | Result of mutation testing. One mutant remaining. | ||||
* | | util.jsonpointer: Improve tests | Kim Alvefur | 2022-10-19 | 1 | -0/+2 |
| | | | | | | | | | | | | | | | | | | Result of mutation testing Remaining mutants are mostly relating to the math.type() fallback. Another case being that array[#array+1] == array[#array+2] and thus doesn't matter. | ||||
* | | util.datamapper: Remove leftover debug assert (Only Teal, not included in build) | Kim Alvefur | 2022-10-19 | 1 | -4/+0 |
| | | |||||
* | | mod_blocklist: Add option 'migrate_legacy_blocking' to disable migration ↵ | Kim Alvefur | 2022-10-17 | 2 | -0/+9 |
| | | | | | | | | | | | | | | | | | | | | | | | | from mod_privacy Tiny performance improvement for new users by skipping this check. Most servers should have gone trough the migration for all active users long ago. As a suitable first step of phasing out this code, we make it possible to disable it first. Later it can be disabled by default, before finally the code is deleted. | ||||
* | | util.stanza: Add new methods to Teal interface specification | Kim Alvefur | 2022-10-17 | 1 | -0/+5 |
| | | | | | | | | | | | | | | at_top: 21217f7e82b9 get_child_with_attr: 39164ea2ab9e get_child_attr: e8934ce6ea0f add_error: 5f182bccf33f | ||||
* | | mod_c2s: Include stream attributes in stream-features event | Matthew Wild | 2022-10-14 | 1 | -1/+1 |
| | | | | | | | | We need this to access 'from' in SASL2/FAST. | ||||
* | | mod_tokenauth: Allow attaching an arbitrary data table to a token | Matthew Wild | 2022-10-13 | 1 | -1/+2 |
| | | |||||
* | | util.cache: Add some missing test cases | Matthew Wild | 2022-10-13 | 1 | -0/+52 |
| | | | | | | | | Found via mutation testing. | ||||
* | | util.jid: Add test for invalid domain but valid UTF-8 (thanks jonas) | Matthew Wild | 2022-10-11 | 1 | -0/+1 |
| | | |||||
* | | util.jid: Simplify boolean logic in conditionals | Matthew Wild | 2022-10-11 | 1 | -3/+3 |
| | | |||||
* | | util.jid: Remove redundant check from split() (micro-optimization?) | Matthew Wild | 2022-10-11 | 1 | -2/+1 |
| | | |||||
* | | util.jid: Add missing test cases | Matthew Wild | 2022-10-11 | 1 | -0/+40 |
| | | | | | | | | (98% mutant score, single remaining mutant is a string.sub equivalent) | ||||
* | | .luacheckrc: Add test_mutants.sh.lua to the ignore list | Matthew Wild | 2022-10-11 | 1 | -0/+1 |
| | | |||||
* | | tools: Add initial mutation testing script | Matthew Wild | 2022-10-11 | 1 | -0/+217 |
| | | |||||
* | | util.dbuffer: Add a bunch of missing test cases | Matthew Wild | 2022-10-11 | 1 | -2/+70 |
| | | | | | | | | Found via mutation testing. | ||||
* | | util.dbuffer: Add efficient shortcuts for discard() in certain cases | Matthew Wild | 2022-10-11 | 1 | -2/+6 |
| | | | | | | | | | | | | If the buffer is already empty, nothing to do. If we're throwing away the whole buffer, we can just empty it and avoid read_chunk() (which in turn may collapse()). These shortcuts are much more efficient. | ||||
* | | util.dbuffer: Remove redundant code (read_chunk() cannot fail at this point) | Matthew Wild | 2022-10-11 | 1 | -7/+3 |
| | | |||||
* | | Merge 0.12->trunk | Kim Alvefur | 2022-10-09 | 2 | -10/+16 |
|\| | |||||
| * | util.jsonschema: Use same integer/float logic on Lua 5.2 and 5.3 | Kim Alvefur | 2022-10-09 | 1 | -2/+2 |
| | | | | | | | | | | Fixes test case type.json:0:1 covering treatment of 1.0 as an integer according to the JSON definition | ||||
| * | util.jsonschema: Fix Lua 5.2 integer compat | Kim Alvefur | 2022-10-09 | 1 | -1/+1 |
| | | | | | | | | | | math.type() is unavailable before Lua 5.3 so this should use the compat function added at the top | ||||
| * | util.jsonschema: Ignore test case for JavaScript specific detail | Kim Alvefur | 2022-10-09 | 1 | -0/+1 |
| | | | | | | | | Also touching on how arrays are indistinguishable from tables in Lua | ||||
| * | util.jsonschema: Ignore some further test cases for URI references | Kim Alvefur | 2022-10-09 | 1 | -0/+5 |
| | | | | | | | | Full-URI references are not implemented | ||||
| * | util.jsonschema: Sort test cases to skip | Kim Alvefur | 2022-10-09 | 1 | -7/+7 |
| | | | | | | | | Piped trough `sort -g` | ||||
* | | util.datetime: Add some missing test cases | Matthew Wild | 2022-10-08 | 1 | -0/+15 |
| | | | | | | | | You guessed it, mutation testing. | ||||
* | | util.roles: Fix tests to use autogenerated role id | Matthew Wild | 2022-10-08 | 1 | -1/+1 |
| | | |||||
* | | util.roles: Add some more missing test cases | Matthew Wild | 2022-10-08 | 1 | -0/+18 |
| | | | | | | | | Found via mutation testing. | ||||
* | | util.promise: Fix field name in failing test (introduced in 2639e0e1c378) | Matthew Wild | 2022-10-07 | 1 | -1/+1 |
| | | |||||
* | | util.promise: Add some missing test cases (found through mutation testing) | Matthew Wild | 2022-10-07 | 1 | -0/+25 |
| | | |||||
* | | util.promise: Remove line that was supposed to be removed in eb9814372c54 | Matthew Wild | 2022-10-07 | 1 | -1/+0 |
| | | |||||
* | | util.promise: Remove some redundant checks, add tests confirming redundancy | Matthew Wild | 2022-10-07 | 2 | -4/+21 |
| | | | | | | | | | | | | | | | | | | This lines don't appear to do anything useful, and all tests pass when they are removed. Discovered via mutation testing. I added extra tests to exercise this code, because I wasn't certain that there were no side-effects caused by removal. Everything appears to be fine, thanks to the "pending" check at the start of promise_settle(). | ||||
* | | util.roles: Add a :policies() method to iterate through available policies | Matthew Wild | 2022-10-07 | 1 | -0/+10 |
| | | | | | | | | | | | | We don't expose the policies directly, to force people to go through :may(). However, there are times when we really just need to know what policies a role has inside it (e.g. for reporting or debugging purposes). | ||||
* | | util.roles: Add tests | Matthew Wild | 2022-10-07 | 1 | -0/+116 |
| | | |||||
* | | util.roles: Return nil if the role has no explicit policy (fixes inheritance) | Matthew Wild | 2022-10-07 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | Previously, if the first inherited role had no opinion, it returned false and prevented further consultation of other inherited roles. This bug was found thanks to the implementation of missing test cases identified through mutation testing. | ||||
* | | mod_smacks: Change boolean attribute from '1' to 'true' for compatibility | Matthew Wild | 2022-10-07 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | Conversations 2.10.10 and earlier expect this to be literally 'true' and don't recognise '1'. This leads to it not attempting resumption with Prosody at all since this change was introduced in 36ba170c4fd0. Thanks to Zash for noticing, debugging and diagnosing this issue. This issue is fixed in Conversations commit 052c58f3 (unreleased at the time of writing). | ||||
* | | util.iterators: join: Work even with only a single iterator in the chain | Matthew Wild | 2022-10-06 | 2 | -1/+10 |
| | | |||||
* | | mod_tokenauth: Remove expired tokens from storage | Matthew Wild | 2022-10-06 | 1 | -0/+2 |
| | | |||||
* | | mod_tokenauth: Invalidate tokens issued before most recent password change | Matthew Wild | 2022-10-06 | 1 | -0/+6 |
| | | | | | | | | | | | | This is a security improvement, to ensure that sessions authenticated using a token (note: not currently possible in stock Prosody) are invalidated just like password-authenticated sessions are. |