Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | luacheck: Shut up (backports 3caff1f93520, ignores module deleted in trunk) | Kim Alvefur | 2022-05-30 | 1 | -2/+2 |
| | |||||
* | util.datamapper: Improve handling of schemas with non-obvious "type" | Kim Alvefur | 2022-07-08 | 1 | -10/+27 |
| | | | | | | | | | | | | The JSON Schema specification says that schemas are objects or booleans, and that the 'type' property is optional and can be an array. This module previously allowed bare type names as schemas and did not really handle booleans. It now handles missing 'type' properties and boolean 'true' as a schema. Objects and arrays are guessed based on the presence of 'properties' or 'items' field. | ||||
* | util.jsonschema: Fix validation to not assume presence of "type" field | Kim Alvefur | 2022-07-08 | 1 | -135/+141 |
| | | | | | | | | | | | | | | | | | | | | | | MattJ reported a curious issue where validation did not work as expected. Primarily that the "type" field was expected to be mandatory, and thus leaving it out would result in no checks being performed. This was likely caused by misreading during initial development. Spent some time testing against https://github.com/json-schema-org/JSON-Schema-Test-Suite.git and discovered a multitude of issues, far too many to bother splitting into separate commits. More than half of them fail. Many because of features not implemented, which have been marked NYI. For example, some require deep comparisons e.g. when objects or arrays are present in enums fields. Some because of quirks with how Lua differs from JavaScript, e.g. no distinct array or object types. Tests involving fractional floating point numbers. We're definitely not going to follow references to remote resources. Or deal with UTF-16 sillyness. One test asserted that 1.0 is an integer, where Lua 5.3+ will disagree. | ||||
* | util.startup: Fix async waiting for last shutdown steps | Kim Alvefur | 2022-06-14 | 1 | -1/+5 |
| | | | | | | | | | | | Observed problem: When shutting down prosody would immediately exit after waiting for s2s connections to close, skipping the last cleanup events and reporting the exit reason and code. This happens because prosody.main_thread is in a waiting state and queuing startup.shutdown is dispatched trough the main loop via nexttick, but since the main loop was no longer running at that point it proceeded to the end of the prosody script and exited there. | ||||
* | util.prosodyctl.check: Remove now redundant unbound config tweak | Kim Alvefur | 2022-05-26 | 1 | -4/+0 |
| | | | | | | | This is now done in net.unbound itself Turning it back on in the config may still cause the problem of entries there masking the DNS values. | ||||
* | util.jsonschema: Lua <5.3 compat here too | Kim Alvefur | 2022-05-09 | 1 | -1/+4 |
| | |||||
* | util.jsonpointer: Fix Lua <5.3 compat | Kim Alvefur | 2022-05-09 | 1 | -1/+5 |
| | |||||
* | util.jsonpointer: Fix off-by-one in array resolution | Kim Alvefur | 2022-05-08 | 1 | -1/+1 |
| | | | | | | Fixes #1753 Not known to be used anywhere | ||||
* | util.prosodyctl.check: turn: Report lack of TURN services as a problem #1749 | Kim Alvefur | 2022-05-03 | 1 | -0/+1 |
| | | | | | Rationale: It seems unlikely that someone who has not configured any TURN service runs 'prosodyctl check turn' expecting this to be okay. | ||||
* | util.argparse: Revise 553c6204fe5b with a different approach | Matthew Wild | 2022-04-25 | 1 | -2/+5 |
| | | | | | | The second return value is (not insensibly) assumed to be an error. Instead of returning a value there in the success case, copy the positional arguments into the existing opts table. | ||||
* | util.argparse: Return final 'arg' table with positional arguments for ↵ | Matthew Wild | 2022-04-25 | 1 | -2/+2 |
| | | | | | | | | convenience This is the same as the input table (which is mutated during processing), but if that table was created on the fly, such as by packing `...` it's convenient if it also gets returned from the parse function. | ||||
* | util.prosodyctl: check turn: ensure a result is always returned from a check ↵ | Matthew Wild | 2022-04-13 | 1 | -2/+2 |
| | | | | (thanks eTaurus) | ||||
* | util.random: Test whether util.crand works before using it (fix #1734) | Kim Alvefur | 2022-04-02 | 1 | -1/+1 |
| | | | | | | | | | | util.crand can be configured at compile time to use the Linux getrandom() system call, available from Linux 3.17, but it is still possible to load it with an older kernel lacking that system call, where attempting to use it throws an ENOSYS error. By testing for this on load we can fall back to /dev/urandom in this case. | ||||
* | prosodyctl: check config: Report paths of loaded configuration files (fixed ↵ | Matthew Wild | 2022-03-28 | 1 | -0/+7 |
| | | | | #1729) | ||||
* | util.startup: Show error for unrecognized arguments passed to 'prosody' ↵ | Matthew Wild | 2022-03-21 | 1 | -6/+13 |
| | | | | (fixes #1722) | ||||
* | prosodyctl: check turn: Fail with error if our own address is supplied for ↵ | Matthew Wild | 2022-03-19 | 1 | -0/+6 |
| | | | | the ping test | ||||
* | prosodyctl: check config: Skip bare JID components in orphan check | Matthew Wild | 2022-03-19 | 1 | -1/+1 |
| | |||||
* | mod_admin_socket: Comment on LuaSocket UNIX compat code | Kim Alvefur | 2022-03-16 | 1 | -0/+6 |
| | | | | Ref #1717 | ||||
* | mod_admin_socket: Compat for luasocket prior to unix datagram support | Kim Alvefur | 2022-03-15 | 1 | -0/+3 |
| | | | | | | | | | | The "socket.unix" module exported only a function before https://github.com/lunarmodules/luasocket/commit/aa1b8cc9bc35e56de15eeb153c899e4c51de82a8 when datagram support was added. Fixes #1717 Thanks rsc and lucas for reporting and testing | ||||
* | prosodyctl: check turn: warn about external port mismatches behind NAT | Matthew Wild | 2022-03-11 | 1 | -5/+11 |
| | | | | | | | Some NATs don't preserve port numbers, which can cause the TURN server's reported relay address to be incorrect (the TURN server has no way to predict what the external port is, so it can't be corrected in config like an IP mismatch can). | ||||
* | spelling: non-existing mistakes (thanks timeless)0.12.0 | Kim Alvefur | 2022-03-07 | 1 | -2/+2 |
| | |||||
* | Spelling: Fix various spelling mistakes (thanks timeless) | Kim Alvefur | 2022-03-07 | 6 | -8/+8 |
| | | | | | | Words, sometimes I wonder how they even work Maybe I missed something. | ||||
* | prosodyctl: check turn: compare correct addresses for relay mismatch ↵ | Matthew Wild | 2022-03-05 | 1 | -2/+5 |
| | | | | detection (thanks Zash) | ||||
* | prosodyctl: check turn: Add check for private IP returned from STUN. | Matthew Wild | 2022-03-05 | 1 | -0/+4 |
| | |||||
* | prosodyctl: check turn: improve warning text to suggest issues | Matthew Wild | 2022-03-05 | 1 | -1/+5 |
| | |||||
* | prosodyctl: check turn: fix traceback when server does not provide realm/nonce | Matthew Wild | 2022-03-05 | 1 | -4/+12 |
| | | | | As coturn when installed out of the box on Debian (because auth isn't enabled?) | ||||
* | prosodyctl: check turn: fix formatting of multiple warnings | Matthew Wild | 2022-03-05 | 1 | -2/+3 |
| | |||||
* | prosodyctl: check turn: always show debug info even if test fails | Matthew Wild | 2022-03-05 | 1 | -11/+15 |
| | |||||
* | prosodyctl: check turn: Clearer error when unable to resolve external ↵ | Matthew Wild | 2022-03-05 | 1 | -1/+1 |
| | | | | service host | ||||
* | prosodyctl: check: include TURN checks by default | Matthew Wild | 2022-03-05 | 1 | -2/+2 |
| | |||||
* | prosodyctl: check: Slightly improved argument handling | Matthew Wild | 2022-03-05 | 1 | -1/+11 |
| | |||||
* | prosodyctl: check turn: show relayed address(es) in verbose mode | Matthew Wild | 2022-03-05 | 1 | -0/+7 |
| | |||||
* | prosodyctl: check turn: Allow specifying port for the ping service | Matthew Wild | 2022-03-05 | 1 | -2/+9 |
| | |||||
* | prosodyctl: check turn: Add support for testing data relay with an external ↵ | Matthew Wild | 2022-03-05 | 1 | -4/+88 |
| | | | | STUN server via --ping | ||||
* | util.bit53: Support for more than 2 arguments, for compat with bit32 | Matthew Wild | 2022-03-04 | 1 | -3/+27 |
| | |||||
* | Merge config-updates+check-turn from timber | Matthew Wild | 2022-03-04 | 7 | -7/+174 |
|\ | |||||
| * | util.bit53: Add left- and right shift operations | Kim Alvefur | 2021-06-28 | 1 | -0/+2 |
| | | | | | | | | | | While not used by anything in Prosody, it is known to be used by some 3rd party modules. | ||||
| * | util.prosodyctl: check turn: New command to verify STUN/TURN service is ↵ | Matthew Wild | 2022-03-04 | 1 | -2/+163 |
| | | | | | | | | operational | ||||
| * | util.hex: Deprecate to/from in favour of encode/decode, for consistency! | Matthew Wild | 2022-03-04 | 4 | -4/+8 |
| | | |||||
| * | core.certmanager: Turn soft dependency on LuaSec into a hard | Kim Alvefur | 2022-02-10 | 1 | -1/+1 |
| | | | | | | | | | | | | The default network backend server_epoll already requires LuaSec so Prosody won't even start without it, so we can get rid of these lines here too. | ||||
* | | prosodyctl: check dns: Allow admin to specify undiscoverable external IPs in ↵ | Matthew Wild | 2022-03-02 | 1 | -0/+5 |
| | | | | | | | | config | ||||
* | | prosodyctl: check dns: List discovered addresses for diagnostic purposes | Matthew Wild | 2022-03-02 | 1 | -0/+16 |
| | | | | | | | | | | | | It is very common to get the "unknown address" warning with this command, but people do not always understand it, or know how to debug it. Now we clearly show the addresses that prosodyctl discovered. | ||||
* | | util.prosodyctl: check: warn about unreferenced components, suggest disco_items | Matthew Wild | 2022-03-02 | 1 | -0/+35 |
| | | |||||
* | | util.prosodyctl: Warn about enabled public registration in 'check config' | Matthew Wild | 2022-03-02 | 1 | -0/+28 |
| | | |||||
* | | util.async: Optionally allow too many 'done' callbacks | Kim Alvefur | 2022-02-22 | 1 | -2/+2 |
|/ | | | | | Sometimes, like in mod_c2s and mod_s2s during shutdown, all you want is to wait for the first done() and not complicate things. | ||||
* | prosody: Move last cleanup and shutdown code into util.startup | Kim Alvefur | 2019-01-01 | 1 | -0/+16 |
| | |||||
* | util.dns: Remove compat for pre-0.11 lack of inet_ntop binding | Kim Alvefur | 2022-02-15 | 1 | -32/+3 |
| | | | | The inet_ntop binding was added in 8b612ec00e4a and included in 0.11.0 | ||||
* | util.dns: Replace base16 implementation with util.hex | Kim Alvefur | 2022-02-15 | 1 | -10/+1 |
| | | | | Less code! | ||||
* | util.dependencies: Refer to 'apt' instead of 'apt-get' | Kim Alvefur | 2022-02-13 | 1 | -6/+6 |
| | | | | | The more modern and user friendly frontend, should be in every supported version of Debian and Ubuntu by now | ||||
* | util.startup: Enable DANE in http client library with use_dane | Kim Alvefur | 2022-02-05 | 1 | -0/+1 |
| |