aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mod_admin_shell: Handle absence of connection in security column (thanks ↵Kim Alvefur2021-11-151-1/+1
| | | | | | arcseconds) I surmise this can happen in a disconnected/smacks hibernation state.
* mod_pubsub: Fix traceback in disco of non-existent node (thanks Martin)Kim Alvefur2021-11-131-2/+6
| | | | | | | In this case `ret` is a table not containing the node, which makes pubsub_error_reply() try to get an error template with that `ret` table as index, which returns a `nil` then passed to table.unpack, which in turn throws the error.
* net.connect: Prefer last connection error over last resolver errorKim Alvefur2021-11-131-1/+1
| | | | | E.g. "connection refused" over one IP version instead of NoError for the other IP version.
* util.prosodyctl.shell: Bring back banner set from config!Kim Alvefur2021-11-121-0/+2
| | | | I miss my custom ANSI-colored greeting!
* net.connect: Propagate last error message from resolversKim Alvefur2021-11-123-5/+28
| | | | | | | | Previously it would only say "unable to resolve server" for all DNS problems. While "NoError in A lookup" might not make much sense to users, it should help in debugging more than the previous generic error. Friendlier errors will be future work.
* s2smanager: Fire s2s-destroyed event to mirror s2s-createdMatthew Wild2021-11-121-0/+1
| | | | | | | | | | | | The existing events do not fire for unauthed sessions, for example (because the type does not match). I deemed changing their behaviour too risky, and the current behaviour may even be more desirable for some uses. This means we now have roughly paired events: - s2s-created -> s2s-destroyed (global only) - s2sin-established -> s2sin-destroyed (global + host) - s2sout-established -> s2sout-destroyed (global + host)
* mod_c2s: Disconnect user sessions on a role change eventMatthew Wild2021-11-121-18/+16
| | | | | The overlapping logic for deletion and password changed has been merged into a single function.
* usermanager: Fire user-roles-changed event when updating roles of a local userMatthew Wild2021-11-121-1/+7
|
* util.human.io: Use UTF-8-aware length check in padding functionsKim Alvefur2021-11-121-2/+2
|
* util.human.io: Fix cutting of UTF-8 into piecesKim Alvefur2021-11-122-7/+40
| | | | Down the rabbit hole we go...
* util.human.io: Trim any broken UTF-8 from ellipsisKim Alvefur2021-11-121-1/+5
| | | | | | | This should fix basic problems with multi-byte UTF-8 sequences getting cut in the middle. Down the rabbit hole we go...
* util.human.io: Factor out ellipsis functionKim Alvefur2021-11-121-1/+6
| | | | Could be useful elsewhere
* util.human.io: Support specifying column defaults in tablesKim Alvefur2021-11-121-1/+1
|
* util.human.io: Pass nil to cell mapper to signal missing valueKim Alvefur2021-11-122-16/+22
| | | | | Seems more like conventional Lua than passing an empty string to signal lack of value.
* mod_admin_shell: Respect metatables in output serializationKim Alvefur2021-11-121-1/+7
| | | | | Makes it so that returning e.g. util.cache :table() produces useful output, which otherwise would look like empty tables.
* util.prosodyctl.shell: Allow setting custom prompt (admin_shell_prompt)Matthew Wild2021-11-111-4/+6
|
* mod_admin_shell: Specify a width for cert columnKim Alvefur2021-11-101-0/+1
| | | | Avoids ellipsis
* mod_admin_shell: Indicate bi-directional s2s connectionsKim Alvefur2021-11-101-1/+2
|
* mod_admin_shell: Allow passing columns as a string for convenienceKim Alvefur2021-11-101-0/+1
|
* mod_admin_shell: Optionally group session listings by host when not included ↵Kim Alvefur2021-11-101-3/+33
| | | | | | as column Similar to the earlier view
* mod_admin_shell: New table based implementation of c2s and s2s:show()Kim Alvefur2021-11-101-198/+245
| | | | | | Nicer and more readable. Thanks jonas’ and prosody@ for JID length stats to inform column widths.
* prosodyctl: Fix weird indentationKim Alvefur2021-11-061-2/+2
|
* doap: Bump XEP-0313 version for going StableKim Alvefur2021-11-031-1/+1
|
* mod_pubsub: Return proper errors for disco queries on nodesKim Alvefur2021-11-011-2/+4
| | | | | Previously this would return item-not-found, even when you could see the node in disco#items.
* util.dataforms: Encode size attributes as integers in XEP-0221 media elementKim Alvefur2021-10-281-1/+1
| | | | Otherwise very large fields would be serialized in e notation
* util.dataforms: Ensure larger integers are serialized as suchKim Alvefur2021-10-282-1/+9
| | | | | | | Assumes that most number fields are integers, as most numeric types listed in XEP-0122 are, as are all such fields in Prosody as of this. Otherwise %g produces something like 1.1259e+15
* util.dataforms: Scope integer handling testsKim Alvefur2021-10-261-26/+29
| | | | | So they're separate from the datetime tests, and any future validation tests
* util.dataforms: Turn number values into timestamps for datetime fieldsKim Alvefur2021-10-262-2/+4
| | | | Makes it symmetric with parsing.
* util.dataforms: Coerce number values for boolean fieldsKim Alvefur2021-10-262-2/+15
| | | | | Makes more sense than coercing to a string, which would always be truthy.
* mod_muc_mam: Use util.dataforms timestamp validationKim Alvefur2021-10-261-14/+5
|
* mod_mam: Use util.dataforms timestamp validationKim Alvefur2021-10-261-14/+5
|
* util.dataforms: Add support for datetime field types via XEP-0122Kim Alvefur2021-10-252-0/+22
|
* mod_http_file_share: Move number coercion into util.dataformsKim Alvefur2021-10-251-2/+2
|
* mod_admin_adhoc: Move number coercion into util.dataformsKim Alvefur2021-10-251-8/+8
| | | | | Internal use of XEP-0122 to shift the responsibility for converting numbers to strings.
* ejabberd2prosody.lua: fix MUC subject conversion with appropriate destructuringarcseconds2021-10-261-1/+2
|
* util.startup: Understand -h, -? as --help in prosodyctl but ignoreKim Alvefur2021-10-251-1/+1
| | | | | prosodyctl -h showing an error was not very helpful, especially since prosodyctl shows its help for any unknown (or none) command.
* util.startup: Show brief usage on `prosody -h|-?|--help`Kim Alvefur2021-10-251-1/+8
| | | | | Seems more suitable than asking if prosodyctl was meant to be used, or going ahead and starting.
* mod_c2s,etc: Identify stanza object with appropriate functionKim Alvefur2021-10-244-9/+9
| | | | | Better than duck typing, in case anyone ever passes a non-stanza table with a 'name' field.
* mod_s2s: Fix logging of <stream:error> consistency with other modsKim Alvefur2021-10-241-1/+1
| | | | | | | `reason` was often a table, so the log said "table: 0xptr" or such. mod_c2s, mod_bosh etc logs the stream error stanza object, so better do the same. It would be nicer if this was an util.error object, but that will have to be a future change.
* util.startup: Skip config readability check in migrator (thanks eTaurus)Kim Alvefur2021-10-231-1/+1
| | | | | | This field is empty for reasons when invoked by prosody-migrator, which threw an error: > bad argument #1 to 'open' (string expected, got nil)
* mod_http_file_share: Silence luacheck warningKim Alvefur2021-10-231-1/+1
|
* mod_http_file_share: Clean up incomplete uploadsKim Alvefur2021-10-231-0/+7
| | | | | | | If the request fails in the middle then the file~ could be left behind because no code was invoked to delete it then. This gets rid of it when the request is removed. It may still be left in case of an unclean shutdown.
* doap: Make note about missing 'restartlogic' from XEP-0206Kim Alvefur2021-10-211-1/+3
|
* doap: Update versions of XEP-0178Kim Alvefur2021-10-211-1/+1
| | | | Context in #1006 and revisions 89c42aff8510 e1d274001855
* doap: Update versions of XEPsKim Alvefur2021-10-211-13/+13
| | | | | | | | Makes it easier to find XEPs that have had new revisions since we last looked at them and the corresponding code. A review of changelogs between these versions point to mostly editorial changes or otherwise without warrant for code changes.
* doap: Fill in missing XEP versionsKim Alvefur2021-10-211-0/+39
| | | | | Makes it easier to find XEPs that have had new revisions since we last looked at them and the corresponding code.
* mod_s2s: Don't pass unknown hostnames as stats labelKim Alvefur2021-10-211-0/+1
| | | | | Labels are supposed to be fixed sets of things, so defined hosts are okay, but not unknown hosts.
* net.server_epoll: Process all queued events from epoll before timersKim Alvefur2021-10-211-2/+4
| | | | | | | Should call timers less frequently when many sockets are waiting for processing. May help under heavy load. Requested by Ge0rG
* mod_http_file_share: Allow 'Authorization' header via CORS (thanks kawaii)Kim Alvefur2021-10-201-0/+3
| | | | | | Can't find anything saying anything on whether this is needed or not. kawaii reported that both Chrome and Firefox complained unless the header was added to the list of allowed headers.
* mod_pubsub,mod_pep: Advertise maximum number of items via XEP-0122Kim Alvefur2021-10-206-6/+20
| | | | | | Clients would generally be using the "max" symbol instead of discovering this, but this also gets us validation and earlier rejection of out of bounds values.