Re: [prosody-dev] Question about datamapper

2024-02-20 Thread 'Kim Alvefur' via prosody-dev

On Mon, Feb 19, 2024 at 05:43:47PM -0800, Stephen Paul Weber wrote:

Here is the JSON input:

{ "alias": "GlitchTip", "text": "GlitchTip Alert", "attachments": [ {
"title": "Some Cool Error", "title_link":
"https://example.com/some-cool-link;, "text": "/inbound/calls" } ] }

And I want to map it to an Atom structure like this:


Some Cool Error
/inbound/calls
https://example.com/some-cool-link; />


The basic issue I'm running into is that because attachments is an array,
datamapper wants to wrap each element of the array in a tag.  I'd like
everything from every element of the array (of which there happens to only
ever be one) to go onto the parent  tag.  


I would consider mapping the array items to  and picking them out
of the larger structure before or after the datamapper step.

For more advanced transforms where the input and output are very
different I think something other than util.datamapper would be more
suited, but other than regular Lua code we don't really have anything
for that right now.

--
Zash

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/ZdTQkYK-QUCak39l%40diploria.zash.se.


Re: [prosody-dev] Re: mod_pubsub_serverinfo

2023-12-28 Thread 'Kim Alvefur' via prosody-dev

Hi,

Thanks, applied as https://hg.prosody.im/prosody-modules/rev/73887dcb2129

On Thu, Dec 28, 2023 at 02:26:05AM -0800, Guus der Kinderen wrote:

\o/

Much gnashing of teeth (and a removal of Mercurial installed through snap)
later, computers finally started to comply. Here's the patch that's similar
to the archive that I linked to earlier.

- Guus

# HG changeset patch
# User Guus der Kinderen 
# Date 1703757755 -3600
#  Thu Dec 28 11:02:35 2023 +0100
# Node ID e5dea4d2c9af19c968e6f95c44abd3275203eeed
# Parent  8566a423da88f8db420bade5a068c90c2c61b074
mod_pubsub_serverinfo: New module that uses pub/sub to make accessible
server info

This first implemetnation is laughably simple: it only adds a disco#info
feature. This flags 'opt-in' for inclusion of local domain names in the
data exposed by other domains (per the domain), which will allow servers to
be listed in the XMPP Network Graph at https://xmppnetwork.goodbytes.im
Hopefully, this bare-boned implementation acts as a stepping stone for
future improvements.

diff -r 8566a423da88 -r e5dea4d2c9af mod_pubsub_serverinfo/README.markdown
--- /dev/null Thu Jan 01 00:00:00 1970 +
+++ b/mod_pubsub_serverinfo/README.markdown Thu Dec 28 11:02:35 2023 +0100
@@ -0,0 +1,8 @@
+---
+labels:
+- 'Statistics'
+...
+
+Exposes server information over Pub/Sub per ProtoXEP: PubSub Server
Information.
+
+This initial version only announces support (used to 'opt-in', per the
XEP). It does not publish any data. This is intended to be a future
addition to this mod.
diff -r 8566a423da88 -r e5dea4d2c9af
mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua
--- /dev/null Thu Jan 01 00:00:00 1970 +
+++ b/mod_pubsub_serverinfo/mod_pubsub_serverinfo.lua Thu Dec 28 11:02:35
2023 +0100
@@ -0,0 +1,1 @@
+module:add_feature("urn:xmpp:serverinfo:0");

On Wednesday, December 27, 2023 at 12:24:40 PM UTC+1 Guus der Kinderen
wrote:


Hi!

I was intending to provide the bare bone Prosody module that implements
the disco#info feature discovery for the protoxep PubSub Server
Information (https://github.com/xsf/xeps/pull/1312) but computers appear
to be fighting me at every opportunity today (HG insists that an editor is
exiting with status 126, preventing me from making commits, and this
mailinglist doesn't seem to allow me to add attachments).

As a workaround, I've uploaded the mod as an archive to my website,
available for download at
https://goodbytes.nl/mod_pubsub_serverinfo.tar.gz - Would someone please
review this and add it to the community modules?

The module itself is laughably simple: it only adds a disco#info feature.
This flags 'opt-in' for inclusion of local domain names in the data exposed
by other domains (per the domain), which will allow servers to be listed in
the XMPP Network Graph at https://xmppnetwork.goodbytes.im Hopefully,
this bare-boned implementation acts as a stepping stone for future
improvements.

Kind regards,

  Guus




--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/786d1f59-47ea-4ec7-844e-68fcae255e99n%40googlegroups.com.


--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/ZY3k-TWSY0F3RfSj%40diploria.zash.se.


Re: [prosody-dev] invalida characters

2023-11-13 Thread 'Kim Alvefur' via prosody-dev

Hi,

On Fri, Nov 03, 2023 at 09:42:55AM -0700, Damian Minkov wrote:

We have been cleaning up our logs lately and we came upon these two errors
about invalid characters. Any recommendations, how do we handle those and
prevent them?


(reduced)

util/stanza.lua:51: invalid tag name: contains invalid characters
mod_saslauth.lua:33: in function 'build_reply'


This one suggests that the SASL handler or authentication module
returned an invalid error code, i.e. things like "malformed-request".
Hard to say more than that based on only this traceback.


Error in timer: util/stanza.lua:65: invalid text value: contains invalid utf8
...are/jitsi-meet/prosody-plugins/mod_presence_identity.lua:11: in function


Looks like invalid or corrupt UTF-8 got into this module, via a timer.

Hope that's enough to proceed.

--
Regards,
Kim "Zash" Alvefur

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/ZVHz9RAynov9MG7F%40diploria.zash.se.


Re: [prosody-dev] [PATCH] UUIDv7 for MAM

2023-09-28 Thread 'Kim Alvefur' via prosody-dev

On Mon, Sep 25, 2023 at 09:10:06AM -0700, Stephen Paul Weber wrote:

This patch set adds the ability to generate UUIDv7 to the util.uuid module,


I have a patch for this with wider Lua version compatibility,
timestamped 2021 that hasn't been merged because nothing uses UUIDv7.


and uses it in mod_storage_internal and mod_storage_sql for the mam ids,
setting the node portion to a merkel hash based on previous mam id and
appended stanza id -- this allows verifying at any point that there is not
a gap in the history.


While interesting, I feel like this is a layering violation. IDs
shouldn't have any semantics without additional negotiation.


--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/ab41c4ac-d01a-4079-ad0b-fa1c2f10e901n%40googlegroups.com.


--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/ZRWeT3vgrCu7QhXh%40diploria.zash.se.


[prosody-dev] [ANN] Prosody 0.12.4 released

2023-09-06 Thread 'Kim Alvefur' via prosody-dev

Hi folks,

We are pleased to announce the release of Prosody 0.12.4.

This is an overdue maintenance release containing a number of bug fixes and
also some improvements from the last few months.

Especially the prosodyctl check tool which gained some new diagnostic
checks as well as handling of configuration option types the same way
Prosody itself does.

A summary of changes since the previous release:

Minor changes

-   core.certmanager: Update Mozilla TLS config to version 5.7
-   util.error: Fix error on conversion of invalid error stanza #1805
-   util.array: Fix new() library function
-   util.array: Expose new() on module table
-   prosodyctl: Fix output of error messages containing ‘%’
-   util.prosodyctl.check: Correct suggested replacement for
‘disallow_s2s’
-   util.prosodyctl.check: Allow same config syntax variants as in
Prosody for some options #896
-   util.prosodyctl.check: Fix error where hostname can’t be turned into
A label
-   util.prosodyctl.check: Hint about the ‘external_addresses’ config
option
-   util.prosodyctl.check: Suggest ‘http_cors_override’ instead of older
CORS settings
-   util.prosodyctl.check: Validate format of module list options
-   mod_websocket: Add a ‘pre-session-close’ event #1800
-   mod_smacks: Fix stray watchdog closing sessions
-   mod_csi_simple: Disable revert-to-inactive timer when going to
active mode
-   mod_csi_simple: Clear delayed active mode timer on disable
-   mod_admin_shell: Fix display of remote cert status when expired etc
-   mod_smacks: Replace existing watchdog when starting hibernation
-   mod_http: Fix error if ‘access_control_allow_origins’ is set
-   mod_pubsub: Send correct ‘jid’ attribute in disco#items
-   mod_http: Unhook CORS handlers only if active to fix an error #1801
-   mod_s2s: Add event where resolver for s2sout can be tweaked

# Download

As usual, download instructions for many platforms can be found on our
download page: https://prosody.im/download

If you have any questions, comments or other issues with this release,
let us know! https://prosody.im/discuss

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/ZPiARrQj7q9qLUU0%40diploria.zash.se.


Re: [prosody-dev] s2s connections

2023-05-24 Thread 'Kim Alvefur' via prosody-dev

Hi Damian and everyone else,

On Tue, May 23, 2023 at 03:37:53PM -0700, Damian Minkov wrote:

Hey all,

How does s2s works, isn't it supposed to have one connection per host pair?

# prosodyctl shell "s2s:show()" | wc -l
461

# prosodyctl shell "s2s:show()"
Session ID   | Host   | Dir  | Remote
 | IPv  | Security  | SASL   | Dialback
s2sin5558e296def0| meet.jit.si| <->  |
conference.v0.meet.ji… | IPv4 | TLSv1.3   | Succeeded  | Not used
s2sin5558e3a52aa0| meet.jit.si| <->  |
conference.v0.meet.ji… | IPv4 | TLSv1.3   | Succeeded  | Not used
s2sin5558e2bce550| meet.jit.si| <->  |
conference.v0.meet.ji… | IPv4 | TLSv1.3   | Succeeded  | Not used

And so on, almost the whole list is like that. Is this leaking the
connections? Any idea what can be the reason for that?


As discussed in the chat room, this in itself isn't really abnormal.
There is no limit in XMPP on the number of connections per host pair,
only a limit in Prosody in that it can only have a single outgoing
connection per remote host. Incoming connections (as these are) can have
any number, which may be uncommon but e.g. would be normal for a
clustered setup.

Often however it can mean that connections are not closed correctly, or
time out on one side without the other side noticing, in which case they
should normally time out after some amount of time.  This amount of time
can however be quite long and mostly depends on kernel settings.

Finally, as it turned out in this case, it could be that the remote
somehow opens a new connection instead of using an existing connection.

On Tue, May 23, 2023 at 03:43:19PM -0700, Damian Minkov wrote:

To update:
the configuration of prosody that is v0, v1 and so on can be seen here:
https://github.com/jitsi/jitsi-meet/blob/master/resources/extra-large-conference/prosody.cfg.lua.visitor.template

And the configuration of the main prosody is mentioned
here: 
https://github.com/jitsi/jitsi-meet/blob/master/resources/extra-large-conference/README.md
The modules about s2s that are enabled are:
 "s2s_bidi";
 "certs_s2soutinjection";
 "s2soutinjection";
 "s2s_whitelist";



Based on discussions in the chat room, this appears to be a problem with
mod_s2soutinjection, which is something of a hack that likely has become
incompatible with the latest prosody developments. Unclear how.

I have published work from a while ago meant to allow for a cleaner way
to accomplish what this module does in the form of this new event:
https://hg.prosody.im/trunk/rev/d5f322dd424b and this new module using
it: https://modules.prosody.im/mod_s2sout_override.html

This works by switching out the "connection resolver" instance that is
responsible for finding targets to connect to.

--
Regards,
Zash

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/ZG5YtnzU9Z8d%2B4Ma%40diploria.zash.se.


[prosody-dev] [ANN] Prosody 0.11.14 released

2022-12-13 Thread 'Kim Alvefur' via prosody-dev

Hi folks,

We are pleased to announce the release of Prosody 0.11.14.

This release fixes an issue in the library Prosody uses to build XML
stanzas, wherein it was too strict and disallowed the character “DEL”,
which is actually allowed by XML. This has no effect on normal stanza
routing and delivery, but may cause reading stanzas from message
archives or offline message stores to fail.

A summary of changes since the previous release:

Fixes and improvements

-   util.stanza: Allow U+7F when constructing stazas

# Download

As usual, download instructions for many platforms can be found on our
download page: https://prosody.im/download

If you have any questions, comments or other issues with this release,
let us know! https://prosody.im/discuss

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/Y5kDaSxDilEG5fQ9%40diploria.zash.se.


Re: [prosody-dev] Bug in mod_s2soutinjection

2022-12-02 Thread 'Kim Alvefur' via prosody-dev

Hi Damian,

On Thu, Dec 01, 2022 at 03:01:18PM -0800, Damian Minkov wrote:

mod_s2soutinjection/mod_s2soutinjection.lua#l20
there is an undefined variable port.


I believe https://hg.prosody.im/prosody-modules/rev/801ca82b6538 should
fix the warning.

--
Thanks,
Kim "Zash" Alvefur

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/Y4ppdAcLKkb55BzB%40diploria.zash.se.


Re: [prosody-dev] ADNS Records Not In Cache

2022-11-04 Thread 'Kim Alvefur' via prosody-dev

Hi,

On Wed, Nov 02, 2022 at 07:13:27AM -0700, Esra Hatice Yılmaz wrote:

Is there any specific configuration for DNS on prosody?


There is some configuration possibilities for the new libunbound based
DNS backend, but not for the older net.dns / adns.


I have been calling  a webservice from prosody. I defined the
webservice URL as abc.com. According to prosody logs abc.com is never
cached and always been trying to resolve from DNS every time.


This happens because a DNS resolver instance is created for each
connection attempt. This is meant to prevent DNS cache poisoning.

Prosody will usually be talking to a caching resolver, so the need for a
local cache inside Prosody itself is limited. Especially since with XMPP
server-to-server connections, the main use of DNS in Prosody, these tend
to be long-lived and any cached records would likely not be used again.

I would recommend that you install lua-unbound and ensure you're on
Prosody 0.12+. With lua-unbound, Prosody uses single long-lived
libunbound resolver instance with its own cache.

--
Kim "Zash" Alvefur

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/Y2UkuLaD4t9K/Clt%40diploria.zash.se.


Re: [prosody-dev] mod_privilege fake session

2022-08-16 Thread 'Kim Alvefur' via prosody-dev

On Tue, Aug 16, 2022 at 03:42:52PM +0200, Nicoco Kinlidec wrote:
This patch makes mod_privilege use a fake session to send stanzas on 
behalf of a user.


This was discussed in prosody's MUC today. Let me know if I should 
change something to get it accepted.


Merged.

I'm not familiar with this module so all I can say in the way of review
is that the luacheck warning count goes up.

--
Regards,
Zash

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/YvvTblwgYyycLWzk%40diploria.zash.se.


Re: [prosody-dev] [PATCH] mod_muc_badge: If room has no title use localpart of room's jid (fixes #1767)

2022-08-04 Thread 'Kim Alvefur' via prosody-dev

On Wed, Aug 03, 2022 at 12:10:57AM +0200, Bernhard Geier wrote:

Rooms may have a title/name, but they do not have to. A JID is enough.

When trying to get the badge for a room without a title, mod_muc_badge 
throws a HTTP error 500 (with Lua 5.1) or shows a "nil" label in the 
SVG badge (with Lua 5.2).


This patch uses this JID's localpart if a room has no title to fix that.




# HG changeset patch


Thanks for the patch, it has been applied:
https://hg.prosody.im/prosody-modules/rev/8a4b17e2e984

--
Zash

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/YuvVWdhwnFSYapJM%40diploria.zash.se.


Re: [prosody-dev] [patch] [update] MUC: Check for an existing occupant when a pre-* hook changes the nickname. Fixes #1739.

2022-06-05 Thread Kim Alvefur

Hi,

On Thu, Apr 07, 2022 at 09:18:20AM -0400, John Regan wrote:

When a user joins a MUC, and a pre-join hook changes their nickname -
it may have been changed into an existing occupant. When this occurs,
the room creates a new occupant, and an existing occupant winds up
being disassociated from the room.

This patch makes the room re-run the existing occupant check when a
nick change has occurred.


Sorry for not replying earlier. Thanks for the patch. It seems to be
fixing the issue described. I'd like to test some other things such as
attempts by other participants to use nicknames already in used by
others and such variations to make sure everything works as intended.
Will most likely merge the patch after that.


Apologies for the git formatting, I don't know mercurial very well - I
just downloaded the latest source, made a git repo, did my changes in
there, and exported as a patch. Hopefully it's easy to apply.


Did you see our page https://prosody.im/doc/contributing ?

--
Regards,
Kim "Zash" Alvefur

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/Ypz/76w1wJsjUx0Q%40diploria.zash.se.


[prosody-dev] [ANN] Prosody 0.11.11 released

2021-12-20 Thread 'Kim Alvefur' via prosody-dev

Merry near winter soltice folks,

We are pleased to announce the release of Prosody 0.11.11.

This release contains some fixes to PEP to control memory usage, along
with a small batch of fixes for issues discovered since the last
release.

This will likely be the last release of the 0.11 branch. (Hype 0.12!)

A summary of changes since the previous release:

Fixes and improvements

-   net.server_epoll: Prioritize network events over timers to improve
performance under heavy load
-   mod_pep: Add some memory usage limits
-   mod_pep: Prevent creation of services for non-existent users
-   mod_pep: Free resources on user deletion (needed a restart
previously)

Minor changes

-   mod_pep: Free resources on reload
-   mod_c2s: Indicate stream secure state in error text when no stream
features to offer
-   MUC: Fix logic for access to affiliation lists
-   net.server_epoll: Improvements to shutdown procedure #1670
-   net.server_epoll: Fix potential issue with rescheduling of timers
-   prosodyctl: Fix to ensure LuaFileSystem is loaded when needed
-   util.startup: Fix handling of unknown command line flags (e.g. -h)
-   Fix version number reported as ‘unknown’ on *BSD

# Download

As usual, download instructions for many platforms can be found on our
download page: https://prosody.im/download

If you have any questions, comments or other issues with this release,
let us know! https://prosody.im/discuss

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/YcD%2Bjy4Twh3Kbi6Z%40carcharodon.zash.se.


signature.asc
Description: PGP signature


Re: [prosody-dev] PATCH makefile: fix prosody.version target

2021-08-28 Thread Kim Alvefur

Hello Lucas,

On Sun, Aug 15, 2021 at 01:46:18PM +, Lucas wrote:

Find a patch to fix prosody.version always getting "unknown" if built
from the release tarball using `makefile`. This is the case at least on
OpenBSD, and I guess the same happens on other BSDs too if they don't
use GNU make. It would be great if it could be backported to 0.11 too.


Thanks, received and stashed¹ for safe-keeping until someone is in a
reviewing mood.  I would like to have a way to test it rather than just
blindly merge it.  Best would be to set up an environment in our CI²,
which currently only have a FreeBSD environment, in addition to too many
Linux distros.

¹ https://hg.prosody.im/contrib/rev/e47e49bf1032
² https://buildbot.prosody.im/

--
Regards,
Kim "Zash" Alvefur

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20210828145447.yfjo2xqrrvjx2zoh%40carcharodon.zash.se.


signature.asc
Description: PGP signature


Re: [prosody-dev] Fwd: [patch] A tiny patch clarifying port usage in doc/ports.md

2021-08-14 Thread Kim Alvefur

Hi,

On Sat, Aug 14, 2021 at 08:44:05PM +0800, Vladimir Nikishkin wrote:

Dear Prosody developers,

The following patch is proposed, please consider it for inclusion:


Thanks, merged with some tweaks. 


As per the page about Contributing https://prosody.im/doc/contributing
and if you look at the history, you should see that commit messages follow a
format like "doc/some/page: Some words". Following existing conventions
is nice.

--
Zash

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20210814162351.hngwj55ppeylwza7%40carcharodon.zash.se.


signature.asc
Description: PGP signature


[prosody-dev] [ANN] Prosody 0.11.10 released

2021-08-03 Thread Kim Alvefur

Hi folks,

We are pleased to announce the release of Prosody 0.11.10.

This release primarily fixes CVE-2021-37601, a remote information
disclosure vulnerability. See the previously released advisory for
details: .
We recommend that all deployments upgrade if they have not yet
applied the mitigation described in the advisory.

A handful fixes for issues discovered since 0.11.9 are also included.

A summary of changes since the previous release:

Security

-   MUC: Fix logic for access to affiliation lists (CVE-2021-37601)

Minor changes

-   prosodyctl: Add ‘limits’ to known globals to warn about misplacing
   it
-   util.ip: Fix netmask for link-local address range
-   mod_pep: Remove obsolete node restoration code
-   util.pubsub: Fix traceback if node data not initialized

# Download

As usual, download instructions for many platforms can be found on our
download page: https://prosody.im/download

If you have any questions, comments or other issues with this release,
let us know! https://prosody.im/discuss

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20210803114734.lrvmx44eteru54ey%40carcharodon.zash.se.


signature.asc
Description: PGP signature


Re: [prosody-dev] prosody-modules commit access

2021-05-14 Thread Kim Alvefur

On Thu, May 13, 2021 at 04:48:09PM -0400, moparisthebest wrote:

Hi,

Can I get prosody-modules commit access?


Sure. Replied off-list with details.

--
Zash

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20210514171550.oczqxmstgjunj3p3%40carcharodon.zash.se.


Re: [prosody-dev] Patch: Documentation of apache2 config

2021-03-30 Thread Kim Alvefur

On Sat, Mar 27, 2021 at 03:01:02PM +0100, Maik Holme wrote:

Hi, this is my first try to contribute something.
A patch for consistency in the docs and another to add the sample config for 
reverse proxys to the doc/http.


Thanks, I've imported them locally for the next time I look at the docs.


I read most of https://documentation.divio.com/
And it seems a lot of the prosody doc are How-to guides. Some are Reference 
guides with some intermixing.
I suppose it will be tough to rewrite everything, but a slow transition could 
be possible maybe.


Rewriting from scratch is not something that should be taken lightly, at
least when it comes to software. Untangling the mixed text and
restructuring it seems like it could help a lot.


What's maybe missing most is a tutorial in the "Getting Started" section. It 
seems lots of people follow some step by step guide from external sites and get outdated 
ir strange setup's.
Would you like such tutorial with all the steps to setup prosody with some 
community modules and a reverse proxy, so that people can learn about that 
while setting up prosody for their first time?


Go for it. The thing most of those are really missing is a review step.

Reminds me that documentation for the new plugin installer still needs
to be written. That has potential for greatly simplifying the setup.

--
Regards,
Kim "Zash" Alvefur

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20210330120539.sdfghnxpggwfirrb%40carcharodon.zash.se.


signature.asc
Description: PGP signature


Re: [prosody-dev] engine:select fetching old data

2021-02-27 Thread Kim Alvefur

Hi,

On Sat, Feb 27, 2021 at 05:59:26AM -0800, genilt...@gmail.com wrote:

I have an administration panel that changes the prosody's DB (Mysql).
When I add more users (affiliations) to the muc, the prosody does not
update. And when I select inside one module, it does not bring the
updated data that is in the DB.

Prosody have any query/object cache? How to disable? Any idea to make
the prosody update the affiliations that there are in the db?


While rooms are active, the authoritative copy of it lives in memory
only. Attempting to change any data of anything active via the data
storage layer will not work, it will get overwritten by Prosody at some
point.

Same with most user data, e.g. deleting the account of an online user
will have no effect and the user can simply change their password to
restore their account. Contact lists and other data are also cached in
memory.

Databases generally don't have any way to tell Prosody that the data
changed, so Prosody has no way to react to changes in data that it's not
told about.

The safe way to interact with Prosody to ensure correct behavior is to
do it via online APIs or while Prosody is shut down. For MUC
affiliations an ad-hoc command has been added in trunk[^1] to allow
changing them from outside the room. Something similar could be done with
a HTTP API if that works better for you. That ad-hoc command could be
called via [mod_rest](https://modules.prosody.im/mod_rest) even.

[^1]: 

--
hope this helps,
Kim "Zash" Alvefur

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20210227205956.hz6bnipb2r7c7mfo%40carcharodon.zash.se.


signature.asc
Description: PGP signature


[prosody-dev] [ANN] Prosody 0.11.8 released

2021-02-15 Thread Kim Alvefur

Hi folks,

We are pleased to announce the release of Prosody 0.11.8.

This time it includes bug fixes and performance improvements!

Thanks to the Jitsi folks for helping us improve websocket performance
in this and the previous release.

This release also fixes a security issue, where channel binding, which
connects the authentication layer (i.e. SASL) with the security layer
(i.e. TLS) to detect man-in-the-middle attacks, could be used on
connections encrypted with TLS 1.3, despite the holy texts declaring
this undefined.

A summary of changes since the previous release:

Security

-   mod_saslauth: Disable ‘tls-unique’ channel binding with TLS 1.3
   (#1542)

Fixes and improvements

-   net.websocket.frames: Improve websocket masking performance by using
   the new util.strbitop
-   util.strbitop: Library for efficient bitwise operations on strings

Minor changes

-   MUC: Correctly advertise whether the subject can be changed (#1155)
-   MUC: Preserve disco ‘node’ attribute (or lack thereof) in responses
   (#1595)
-   MUC: Fix logic bug causing unnecessary presence to be sent (#1615)
-   mod_bosh: Fix error if client tries to connect to component (#425)
-   mod_bosh: Pick out the ‘wait’ before checking it instead of earlier
-   mod_pep: Advertise base PubSub feature (#1632)
-   mod_pubsub: Fix notification stanza type setting (#1605)
-   mod_s2s: Prevent keepalives before client has established a stream
-   net.adns: Fix bug that sent empty DNS packets (#1619)
-   net.http.server: Don’t send Content-Length on 1xx/204 responses
   (#1596)
-   net.websocket.frames: Fix length calculation bug (#1598)
-   util.dbuffer: Make length API in line with Lua strings
-   util.dbuffer: Optimize substring operations
-   util.debug: Fix locals being reported under wrong stack frame in
   some cases
-   util.dependencies: Fix check for Lua bitwise operations library
   (#1594)
-   util.interpolation: Fix combination of filters and fallback values
   #1623
-   util.promise: Preserve tracebacks
-   util.stanza: Reject ASCII control characters (#1606)
-   timers: Ensure timers can’t block other processing (#1620)

# Download

As usual, download instructions for many platforms can be found on our
download page: https://prosody.im/download

If you have any questions, comments or other issues with this release,
let us know! https://prosody.im/discuss

--
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20210215201742.js3sjip2ivgfsyuj%40carcharodon.zash.se.


signature.asc
Description: PGP signature


Re: [prosody-dev] [PATCH] Support for regular expressions in trusted_proxies (mod_http)

2020-06-10 Thread Kim Alvefur
Hi

On Mon Jun 1, 2020 at 4:44 PM CEST, Boris Grozev wrote:
> Hello everyone,
>
> We have a use-case where we don't know the IP addresses of our HTTP
> proxies in advance, so we want to configure an entire network in
> trusted_proxies. I opted to implement it with additional syntax in the
> trusted_proxies list in order to keep the configuration under the
> existing key, while avoiding a change in semantics for existing
> configurations (the "." in IP literals becomes a wildcard character in
> a regexp).
>
> Ideally this would support CIDR notation (so we can express e.g.
> 172.16/12), but that seemed much more complicated and not necessary
> for our case.

CIDR notation is supported by util.ip, which unfortunately is missing
documentation. Example use can be found in mod_register_limits, added in
this change: https://hg.prosody.im/0.11/rev/4796fdcb7146

> Let me know if there's any changes you'd like me to make in order for
> the patch to be accepted.

Normalize the whitespace to tabs please.

-- 
Regards,
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/C3DHCHSFAHAB.202R4TJKQDF31%40tengi.


Re: [prosody-dev] [PATCH] doc:dns: Actually underline the must‐change parameters

2020-05-05 Thread Kim Alvefur
On Tue May 5, 2020 at 5:12 PM PST, Grzegorz Szymaszek wrote:
> Hi,
>
> The patch fixes the doc:dns article to use bold+underline instead of
> bold+italic. This is to match the description below:
>
> > The bold text indicates parts of the record that you can change. The
> > underlined bold text [=E2=80=A6]

Thanks, applied as https://hg.prosody.im/site/rev/96bc2963e260

Based on https://hg.prosody.im/dokuwiki/file/default/doc/dns.txt and
https://hg.prosody.im/dokuwiki/file/html/doc/dns.html it looks like the
original underlines were not exported from the original DokuWikis as
``, but `` that then turned into `*...*` syntax during the
conversion to Markdown.

But now I'm a bit scared that HTML is even allowed at all in this.

Thanks anyways!

-- 
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/C2IV850IV3IX.115RYF998B2XR%40tengi.


Re: [prosody-dev] [Heads up] trunk nightly package change

2020-04-19 Thread Kim Alvefur
Hey,

To follow up: Our build machine did not like the changes and needed some
convincing, but it seems to finally be building packages.

-- 
Zash

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20200419141957.rzwpdmu2jll6nfh2%40carcharodon.zash.se.


signature.asc
Description: PGP signature


[prosody-dev] [Heads up] trunk nightly package change

2020-04-18 Thread Kim Alvefur
Hey,

I just pushed some changes to the `prosody-trunk` nightly package to
make it use whatever version of Lua is installed and selected by the
"alternatives" system in Debian.

This will be in tomorrows build, assuming our build machine can handle
the change. If it fails, there won't be an update so nothing to worry
about. Older .debs can be found on https://packages.prosody.im/nightly/
In case it builds a broken package.

If nothing goes wrong then it will be easier to test and compare how
Prosody behaves on the various versions of Lua, e.g. garbage collection
behavior and performance.

-- 
Zash

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20200419004237.3v7zzozytl64vhaj%40carcharodon.zash.se.


signature.asc
Description: PGP signature


[prosody-dev] [ANN] Prosody 0.11.5 released

2020-03-24 Thread Kim Alvefur
Hi folks,

We are pleased to announce the release of Prosody 0.11.5.

This release mostly adds command line flags to force foreground or
background operation, which replaces and deprecates the ‘daemonize’
option in the config file.

A summary of changes since the previous release:

Fixes and improvements

-   prosody / mod_posix: Support for command-line flags to override
‘daemonize’ config option

Minor changes

-   mod_websocket: Clear mask bit when reflecting ping frames (fixes
#1484: Websocket masks pong answer)

# Download

As usual, download instructions for many platforms can be found on our
download page: https://prosody.im/download

If you have any questions, comments or other issues with this release,
let us know! https://prosody.im/discuss

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20200324215149.tunsboecuqup7eje%40carcharodon.zash.se.


[prosody-dev] [ANN] Prosody 0.11.4 released

2020-01-18 Thread Kim Alvefur
We are pleased to announce the release of Prosody 0.11.4.

This release contains a number of bug fixes and a couple of performance
improvements.

A summary of changes since the previous release:

Fixes and improvements

-   core.rostermanager: Improve performance by caching rosters of
offline #1233
-   mod_pep: Handling subscriptions more efficiently #1372

Minor changes

-   util.interpolation: Support unescaped variables with more modifiers
#1452
-   MUC: Mark source of historic messages correctly #1416
-   mod_auth_internal_hashed: Pass on errors #1477
-   mod_mam, mod_muc_mam: Improve logging of failures #1478, #1480,
#1481
-   mod_muc, mod_muc_mam: Reschedule message expiry in case of failure
-   mod_mam: Add flag to session when it performs a MAM query
-   prosodyctl check: Warn about conflict between mod_pep and
mod_pep_simple
-   prosodyctl check: Warn about conflict between mod_vcard and
mod_vcard_legacy #1469
-   core.modulemanager: Disable mod_vcard if mod_vcard_legacy is enabled
to prevent conflict #1469
-   MUC: Strip tags with MUC-related namespaces from private messages
#1427
-   MUC: Don’t advertise registration feature on host #1451
-   mod_vcard_legacy: Fix handling of empty photo elements #1432
-   mod_vcard_legacy: Advertise lack of avatar correctly #1431
-   prosodyctl: Handle if the setting proxy65_address has the wrong type
-   prosodyctl: Print a blank line to improve spacing and readability
-   MUC: Fix role loss in Nickname change #1466
-   util.pposix: Fix reporting of memory usage in 2-4GB range #1445
-   util.startup: Fix a regression concerning directory paths #1430
-   mod_websocket: Don’t mask WebSocket pong answers #1484
-   net.resolvers: Apply IDNA conversion to ascii for DNS lookups
(affects only HTTP queries) #1426
-   net.resolvers.basic: Fix resolution of IPv6 literals (in brackets)
#1459

# Download

As usual, download instructions for many platforms can be found on our
download page: https://prosody.im/download

If you have any questions, comments or other issues with this release,
let us know! https://prosody.im/discuss

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20200118162039.qqa5t7aqpw4knler%40carcharodon.zash.se.


Re: [prosody-dev] [PATCH] mod_auth_imap: send CRLF to IMAP server

2019-12-21 Thread Kim Alvefur
On Thu, Dec 19, 2019 at 07:28:55PM +, Andrew Hotlab wrote:
> This fix a misbehavior: as for RFC3501, all commands sent to an IMAP
> server must terminate using CRLF.

As mentioned in the channel, this was merged as


Thanks again!

-- 
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20191221203002.r5twyfvnofnk3sos%40carcharodon.zash.se.


Re: [prosody-dev] patch for mod_extdisco.lua

2019-05-23 Thread Kim Alvefur
Hi,

On Wed, May 22, 2019 at 11:27:37PM -0700, Alexey Bobyr wrote:
> According to https://xmpp.org/extensions/attic/xep-0215-0.6.html service 
> tag must is a child element of 'services' tag in reply.
> Attached patch adds main tag services.

Thanks. Patch looks good. I noticed that the other handler has the same issue.

> Please note that https://xmpp.org/extensions/xep-0215.html now contains 
> urn:xmpp:extdisco:2
> So maybe need to change mod_extdisco description that it adds support of 
> XEP-0215 its not true anymore. 

Looks like the incompatible changes between the :1 and :2 namespace
mainly concern service pushes, which is not implemented here.

-- 
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prosody-dev/20190523152417.erwu3hneqc4lg6pn%40carcharodon.zash.se.
For more options, visit https://groups.google.com/d/optout.


Re: [prosody-dev] Prosody events

2019-05-02 Thread Kim Alvefur
Hi,

On Tue, Apr 23, 2019 at 09:33:10PM -0700, Milind Gupta wrote:
>I am new to prosody. I want to modify the welcome module to send a 
> message to the user after 2 days of registration. Which even can I use? 

`presence/initial` is probably a good candidate, it happens when the
user broadcasts that they are online. An example can be found in the
module mod_motd.

https://prosody.im/doc/developers/events#initial_presence

> Also I cannot find the documentation where the event user-registered (used 
> in mod_welcome) is described. Is it undocumented?

I see no mention of it anywhere in the docs, so it does not appear to be
documented.

>I am also looking to use the util.sasl to modify the 
> mod_auth_custom_http API but there is no documentation for it. Any help 
> would be greatly appreciated.

Any hints for what info that documentation should provide?

FWIW you can find examples of its use in the many existing
authentication modules that exist.


Btw, feel free to file issues for any missing documentation at
 (there's a type/preset for docs).

The documentation along with the rest of the website can be found in
 if anyone feels like contributing.

-- 
Regards,
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


Re: [prosody-dev] [ANN] Prosody trunk nightly builds to use ICU

2019-04-29 Thread Kim Alvefur
On Mon, Apr 29, 2019 at 06:46:47PM -0500, Lonnie Abelbeck wrote:
> Hopefully libidn will still be optionally supported.

For now.  It's a compile-time setting passed to the `./configure`
script, which means it's usually decided by the packager or whoever
builds from source.

I'm not sure what the future of libidn is.

Its website  states
> Please be aware that GNU libidn2 is the successor of GNU libidn.

Does this mean that libidn is deprecated? I'm not sure.

libidn2 is missing the parts we use for XMPP addresses, so switching to
that is not really an option.

-- 
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


[prosody-dev] [ANN] Prosody trunk nightly builds to use ICU

2019-04-29 Thread Kim Alvefur
Hello,

To allow testing the new [mod_mimicking] just pushed to trunk, nightly
builds have been configured to use ICU instead of libidn for Unicode
normalization operations.

[mod_mimicking]: https://prosody.im/doc/modules/mod_mimicking

ICU or libidn are responsible for turning XMPP addresses into the right
form so that they can be compared and used as database keys etc.

GNU libidn has been the default used by Prosody for so long that we no
longer remember why.

The ICU library has more features, including the one needed for
mod_mimicking, and appears to also have better performance.

If this change breaks anything then please tell us about it. The
previous nightly packages can be found and installed manually from


We are considering making ICU the recommended library if no problems
appear.

--
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


Re: [prosody-dev] Need help writing a module

2017-07-08 Thread Kim Alvefur
Hi,

On Thu, Jul 06, 2017 at 04:45:16PM -0400, James Cloos wrote:
> I need some help getting a module working for prosody.
> 
> It needs to listen on a localhost tcp socket and accept http POSTs
> with json bodies akin to:
> 
>{"from":"8...@x.example.net", "to":"9...@x.example.net", "body":"Hello"}
> 
> and confirm that the to's domain is served locally (this install does
> not do s2s) and if so, send the message.
> 
> Authentication will be done outside of prosody; the module does not
> have to deal with auth, just send whatever it gets.
> 
> If the domain is not local, a 400 reply should be sent, with:
> 
>   {false}
> 
> and if the domain is local, a 200 with:
> 
>   {true}
> 
> and Content-Type applicaion/json in both cases.
> 
> I wrote a module based on what is in the prosody-modules repo, but
> have not managed to get it to work.
> 
> Can anyone help out?

This module is pretty close to what you want, it should be a simple
matter to adjust the accepted syntax to your specific needs.

https://modules.prosody.im/mod_post_msg.html

-- 
Zash

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


Re: [prosody-dev] [PATCH][0.10] muc: Allow clients to change multiple affiliations or roles at once (#345)

2017-04-17 Thread Kim Alvefur
On Mon, Apr 17, 2017 at 02:32:22PM +0100, Matthew Wild wrote:
>   - Treat the request as an atomic change: succeed for all, or fail
> all (i.e. if one of the JIDs is malformed, don't allow any of the
> other changes in the request to take place). This would require work
> to either pre-verify the changes (which we don't have code for) or to
> roll back changes that were already made (which is a bit hacky, we'd
> already have sent out notifications, unless we added a new 'batch
> update' version of :set_affiliation()).

I would prefer this. Possibly by collecting the changed state in a new
table, then overwriting the old affiliations table as a commit.

-- 
Zash

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: [prosody-dev] mod_mam: support XEP-0313 v0.5 keeping compatibility with previous XEP-0313 v0.3

2017-02-20 Thread Kim Alvefur
On Thu, Dec 29, 2016 at 10:25:00AM +0100, Victor Seva wrote:
> This is the work I've done at mod_mam[0] in order to support the latest
> version of XEP-0313
> 
> The module now supports both versions "urn:xmpp:mam:0" and
> "urn:xmpp:mam:1"

The communtiy version of mod_mam now supports every version of XEP-0313
between 0.3 (urn:xmpp:mam:0) and 0.6 (..:mam:2). Meanwhile, the 0.10
version supports only the latest (0.6 or :2). Some changes from the 0.10
version has also been merged back in. 

> Attached patch from hg export output.

Thanks, however I did not use your patch directly. Some inspiration may
have been drawn from it however.

-- 
Regards,
Zash

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


Re: [prosody-dev] [ANN] Prosody 0.9.12 released

2017-01-10 Thread Kim Alvefur
On Tue, Jan 10, 2017 at 03:02:10PM -0600, Lonnie Abelbeck wrote:
> Hmmm, still not seeing it here: https://prosody.im/downloads/source/

Cached somewhere probably. Try a hard reload.

Direct links are:

https://prosody.im/downloads/source/prosody-0.9.12.tar.gz
https://prosody.im/downloads/source/prosody-0.9.12.tar.gz.asc


-- 
Zash

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: [prosody-dev] [ANN] Prosody 0.9.12 released

2017-01-10 Thread Kim Alvefur
On Tue, Jan 10, 2017 at 02:48:10PM -0600, Lonnie Abelbeck wrote:
> The source download is missing for 0.9.12.

Fixed, thanks for noticing.

-- 
Regards,
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: [prosody-dev] bug: mod_saslauth sends incorrect auth success response

2016-08-28 Thread Kim Alvefur
On 2016-08-25 19:19, Andrey Prokopenko wrote:
> Hi fellow chatters.
> Just discovered a rather nasty bug in mod_saslauth module, effectively
> preventing Smack (or any other XMPP lib) to connect to the prosody.
> In particular, function *build_reply* within SASL authentication module
> *mod_saslauth.lua* adds "=" sign to empty response. Thus reply cannot be
> decoded back from Base64 and processed with Smack library (or any other
> XMPP library in fact )and fails with "invalid base" exception.
> 
> Proposed fix: remove "=" sign assignment inside aforementioned function
> and replace it with empty string. After that empty string Base 64 decode
> passes flawlessly.
> Tested successfully on my server.
> 

As replied to the issue you opened, this is intentional and per spec.
https://prosody.im/issues/issue/729

If anything, whatever provides the PLAIN implementation is being a bit
odd by returning additional data.

-- 
Regards,
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] [PATCH] mod_cloud_notify: default false for sending body and sender

2016-06-03 Thread Kim Alvefur
On 2016-06-02 23:12, Chris Ballinger wrote:
> # HG changeset patch

Applied, thanks.


-- 
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Some issues with mod_cloud_notify

2016-05-26 Thread Kim Alvefur
On 2016-05-25 23:16, Chris Ballinger wrote:
> Not sure about the proper way to submit a pull request, but we have some
> proposed modifications to the existing module that I'd like some
> feedback on first.
> 
> 1. push_enabled is not persisted across server restarts (only reloads).
> This means that users won't receive pushes until they login again. Is
> there an easy way to accomplish this with the existing persistent
> storage API? I had trouble finding docs for the storage API.

Someone filed an issue for it here FWIW:
https://prosody.im/issues/issue/676

> 2. pushes are triggered for typing notifications (and possibly other
> extraneous stanzas as well). Would this be desired for some use cases
> and configurable (for instance to wake up the receiving client more
> quickly), or would it be better to just filter out all messages without
> a body?

and MattJ wrote:
> I don't see any typical use cases for no-body messages being pushed.

It's not that simple, what about OMEMO, or other non-body message with
some alternative payload? And this problem also applies to Carbons, MAM
and possibly other things.

-- 
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Milli second time

2016-03-25 Thread Kim Alvefur
Hi,

On 2016-03-25 14:27, Harsha Bellur wrote:
> I am not sure if this topic has been broached before but is there a way I 
> can get time in miilisecond granularity?

TL;DR: require("socket").gettime()

Lua generally only provides what C provides, and C does not provide
sub-second precision time.  Prosody uses the 'gettime' function from
LuaSocket when it needs precision time, eg for timers and such.

-- 
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] s2s_require_encryption and gmail.com

2016-01-23 Thread Kim Alvefur
Hi,

Replies inline. 

fre jan 22 23:14:13 2016 GMT+0100 skrev François L.:
> Hi,
> 
> I've same problem,
> Log say :
> Jan 22 23:07:30 s2sout13310a8   infooutgoing s2s stream myserver.tld 
> ->gmail.com closed: Encrypted server-to-server communication is required 
> but was not offered
> Jan 22 23:07:30 s2sout13310a8   infoSending error replies for 1 queued 
> stanzas because of failed outgoing connection to gmail.com
> 
> In my prosody.cnf.lua, they are : 
> s2s_require_encryption = true

This means require encryption, no exceptions. We have no plans on supporting 
exceptions to this but someone could write a plugin for it if they really 
wanted ;) 

> s2s_insecure_domains = { "gmail.com", "xmpp-server.l.google.com" }

This adds an exception to s2s_secure_auth, not encryption requirements.

Setting s2s_secure_auth = true would implicitly require encryption except for 
those in  s2s_insecure_domains.
 
> (i add xmpp-server.l.google.com, it's DNS entry to gtalk).

Only "gmail.com" would matter here, so this doesn't help.  

> Prosody 0.99

I assume you mean 0.9.9
 
> Any idea?
> 
> Crante
> 
> 
> Le vendredi 6 juin 2014 20:47:43 UTC+2, Nicolás Reynolds a écrit :
> >
> > Timothée Ravier  writes: 
> >
> > > Hi, 
> > > 
> > > I've read the XMPP TLS manifesto and I'd like to enforce it. But 
> > gmail.com 
> > > doesn't do TLS and I'd like to exclude just this one. 
> > > 
> > > I know that this is not ideal, but that's still better for me than the 
> > > current status: not enforcing TLS for anyone. 
> >
> > without patching, i've tested a combination of s2s_require_encryption = 
> > true and s2s_insecure_domains = { "gmail.com" } but the second option 
> > seems to be ignored, is it meant to be used with s2s_require_encryption 
> > = false or another option? 
> >
> > has anyone contacted google about this? (not that i think it's a cool 
> > corp) 
> >
> > -- 
> > http://librevpn.org.ar 
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "prosody-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to prosody-dev+unsubscr...@googlegroups.com.
> To post to this group, send email to prosody-dev@googlegroups.com.
> Visit this group at https://groups.google.com/group/prosody-dev.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


Re: [prosody-dev] Is it possible to use anonymous access of Prosody to implement live help?

2015-12-17 Thread Kim Alvefur
On 2015-12-17 19:34, Thijs Alkemade wrote:
> one approach to live help systems is to
> create a new MUC (with a randomly generated name [1]) when a user requests the
> help and then send invitations to the people who can offer help

Perhaps have a look at http://code.matthewwild.co.uk/support-chat/ which
if I remember correctly does what you describe.

-- 
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Prosody : Private Chatroom Issues

2015-08-26 Thread Kim Alvefur
On 2015-08-26 15:18, Kim Alvefur wrote:
 On 2015-08-25 08:40, Gauri Padbidri wrote:
 The problem is when I query Prosody to give me a list of Chat rooms for
 the given user, it will return me the PUBLIC Chat rooms but NOT the
 PRIVATE Chat rooms I created...Is it because I have set
 muc#roomconfig_publicroom to FALSE, which makes them hidden publicly ?
 Also, what configuration can I do on Prosody Config to fetch Private
 Rooms as well.
 
 This is the bit that generates the list of rooms:
 http://hg.prosody.im/0.10/file/8b4c8e957211/plugins/muc/mod_muc.lua#l129
 
 It only checks if the room is hidden, so it would need to become more
 complicated in order to also show private/hidden rooms to those who
 would be allowed to see it.  And who would be allowed to see it?
 Owners?  Any members?
 

Try the attached patch. :)

-- 
Kim Zash Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
prosody-dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# User shelve@localhost
# Date 1440595846 -7200
#  Wed Aug 26 15:30:46 2015 +0200
# Node ID 5e9506d3cdc91f99e116fdbe73e61508d7c19ba5
# Parent  442019e955dc8e69371a81c53b888cc422a63ebd
Show hidden rooms to people with an affiliation

diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -128,9 +128,12 @@
 
 module:hook(host-disco-items, function(event)
 	local reply = event.reply;
+	local sender = event.stanza.attr.from;
 	module:log(debug, host-disco-items called);
 	for jid, room in pairs(rooms) do
-		if not room:get_hidden() then
+		local affiliation = room:get_affiliation(sender);
+		if affiliation == outcast then affiliation = nil; end
+		if not (room:get_hidden() and affiliation == nil) then
 			reply:tag(item, {jid=jid, name=room:get_name()}):up();
 		end
 	end


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Prosody : Private Chatroom Issues

2015-08-26 Thread Kim Alvefur
On 2015-08-25 08:40, Gauri Padbidri wrote:
 The problem is when I query Prosody to give me a list of Chat rooms for
 the given user, it will return me the PUBLIC Chat rooms but NOT the
 PRIVATE Chat rooms I created...Is it because I have set
 muc#roomconfig_publicroom to FALSE, which makes them hidden publicly ?
 Also, what configuration can I do on Prosody Config to fetch Private
 Rooms as well.

This is the bit that generates the list of rooms:
http://hg.prosody.im/0.10/file/8b4c8e957211/plugins/muc/mod_muc.lua#l129

It only checks if the room is hidden, so it would need to become more
complicated in order to also show private/hidden rooms to those who
would be allowed to see it.  And who would be allowed to see it?
Owners?  Any members?

-- 
Regards,
Kim Zash Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
prosody-dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] is it lua 5.1 really required for Prosody .9.8?

2015-08-20 Thread Kim Alvefur
Hi Ben,

FWIW, the changes needed to run Prosody on Lua 5.2 have been fiddled
over from timber to the 0.10 and trunk branches.

-- 
Regards,
Kim Zash Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
prosody-dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Prosody logging to external syslog server

2015-07-09 Thread Kim Alvefur
Hi,

On 2015-07-09 16:16, Andy Shutler wrote:
 I was wondering,  if it is possible to send the logging to an external
 syslog server and if it is, how the configuration of this is done?

That configuration would be done in your syslog daemon.  You can't do it
from prosody, it's just using the syslog() system call.

Search for something like remote logging and the name of your syslog
daemon.

An alternative would be to implement a remote logging protocol in a
module and add that as a log sink.

-- 
Kim Zash Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
prosody-dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Attach to websocket

2015-05-25 Thread Kim Alvefur
On 2015-04-23 14:09, Teodor Pripoae wrote:
 Authentication is done server side, returning JID, SID and RID to client
 which then attaches to BOSH session using strophe.js. Is there any way
 to attach to xmpp-websocket  instead of BOSH using BOSH sessions (JID,
 SID, RID) ?

SID and RID are BOSH-specific and doesn't have equivalents in
XMPP-WebSocket, so can't be used to attach to a session like in BOSH.

You might be able to do a Stream Management resumption, see XEP-0198.

-- 
Kim Zash Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
prosody-dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Submitting new third party modules

2015-05-11 Thread Kim Alvefur
On 2015-05-11 03:54, Hugo Osvaldo Barrera wrote:
 Also on this topic, any plans on where prosody will be hosted in future?

Prosody will be hosted at http://hg.prosody.im/

-- 
Regards,
Kim Zash Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
prosody-dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Submitting new third party modules

2015-04-29 Thread Kim Alvefur
On 2015-04-29 13:30, Matthew Wild wrote:
 The prosody-modules on hg.prosody.im is a read-only mirror, and we've
 had that for a long time (before the announcement from Google).

Since 2013 (if timestamps are to be believed)!

--
Kim Zash Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
prosody-dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Prosody 0.10 nightly build 118 - no changes?

2015-03-27 Thread Kim Alvefur
Hi!

On 2015-03-27 18:56, deoren wrote:
 I noticed that there is a new build for Prosody 0.10, but the Changes
 since previous build section is empty.

The changes consisted only of merge commits.  The scripts that create
those pages do not include merge commits in the listing.

We originally produced new nightlies at the time of the 0.9.8 release,
however the branch merge from 0.9 to 0.10 accidentally removed some
changes that were only in 0.10.  So another attempt at merging them was
made, which seems to have gone wrong as well, so we will need to do it
again.

Try running `hg log -r 03a43bf3ecd2:61b6a4fc65f1 `, that should list the
merges.

Hope it's clearer now.

--
Regards,
Kim Zash Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
prosody-dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] Small bug in brew installer on OS X

2014-10-15 Thread Kim Alvefur
On 2014-10-15 16:39, David Millman wrote:
 Ah, yes, updating brew brought in lua51 and lua is now version 5.2.3_1.
  Thank you for the suggestion.  Out of curiosity, does prosody not work
 with the newer versions of lua?

Not yet, we've just started working on it.  The situation is similar to
Python 2 vs 3, Lua 5.2 is a different language from 5.1, only Lua is a
smaller language so the difference is not as big as with Python.

--
Regards,
Kim Zash Alvefur



signature.asc
Description: OpenPGP digital signature


Re: [prosody-dev] [ANN] Prosody 0.9.5 released!

2014-10-11 Thread Kim Alvefur
On lör 11 okt 2014 18:46:10, Lonnie Abelbeck li...@lonnie.abelbeck.com wrote:
 +    ( cd plugins ; find . -type f -exec install -D -m644 '{}'

If we can assume that find is available everywhere then something like this 
shoud work.

--
Kim Zash Alvefur 

-- 
You received this message because you are subscribed to the Google Groups 
prosody-dev group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.


Re: [prosody-dev] limiting concurrent logins from same jid?

2014-05-04 Thread Kim Alvefur
Hi Peter,

On 2014-05-03 20:51, Peter Villeneuve wrote:
 How can I limit concurrent logins from the same account on Prosody?
 ie. if user A is logged in once, then any subsequent attempts to login
 will fail.

There's this simple plugin:
http://prosody-modules.googlecode.com/hg/mod_c2s_limit_sessions/

No docs written yet, sorry about that.  The only configuration option is
max_resources, which defaults to 10.  So you want to add
max_resources = 1
to your config file and of course add the module to the modules_enabled
list.

 I know this goes against the spirit of xmpp, but I have a particular
 case where I need to make sure that each jid is only logged in once.

Well, you might want to have a reasonable limit anyways.  I've heard
stories of people who created chat services where everyone was using the
same jid on another server.

--
Hope this helps,
Kim Zash Alvefur



signature.asc
Description: OpenPGP digital signature