Software /
code /
prosody
File
CHANGES @ 11476:83e127eb91f9
util.datamapper: Deal with locally built stanzas missing xmlns
So the problem is that xmlns is not inherited when building a stanza,
and then :get_child(n, ns) with an explicit namespace does not find that
such child tags.
E.g.
local t = st.stanza("foo", { xmlns = "urn:example:bar" })
:text_tag("hello", "world");
assert(t:get_child("hello", "urn:example:bar"), "This fails");
Meanwhile, during parsing (util.xmppstream or util.xml) child tags do
get the parents xmlns when not overriding them.
Thus, in the above example, if the stanza is passed trough
`t = util.xml.parse(tostring(t))` then the assert succeeds.
This change makes it so that it leaves out the namespace argument to
:get_child when it is the same as the current/parent namespace, which
behaves the same for both built and parsed stanzas.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 23 Mar 2021 19:52:59 +0100 |
parent | 11421:926d53af9a7a |
child | 11515:10d13e0554f9 |
line wrap: on
line source
TRUNK ===== - Module statuses - SNI support (not completely finished) - CORS handling now provided by mod\_http - CSI improvements - mod\_limits: Exempted JIDs - Archive quotas - mod_mimicking: Prevent address spoofing - Rewritten migrator - SCRAM-SHA-256 - Bi-directional server-to-server (XEP-0288) - Built-in HTTP server now handles HEAD requests - MUC presence broadcast controls - ALPN support in mod\_net\_multiplex - `daemonize` option deprecated - SASL DIGEST-MD5 removed - Switch to libunbound for DNS queries - mod_external_services (XEP-0215) - util.error for encapsulating errors - MUC: support for XEP-0421 occupant identifiers - mod_http_file_share: File sharing via HTTP (XEP-0363) 0.11.0 ====== **2018-11-18** New features ------------ - Rewritten more extensible MUC module - Store inactive rooms to disk - Store rooms to disk on shutdown - Voice requests - Tombstones in place of destroyed rooms - PubSub features - Persistence - Affiliations - Access models - "publish-options" - PEP now uses our pubsub code and now shares the above features - Asynchronous operations - Busted for tests - mod\_muc\_mam (XEP-0313 in groupchats) - mod\_vcard\_legacy (XEP-0398) - mod\_vcard4 (XEP-0292) - mod\_csi, mod\_csi\_simple (XEP-0352) - New experimental network backend "epoll" 0.10.0 ====== **2017-10-02** New features ------------ - Rewritten SQL storage module with Archive support - SCRAM-SHA-1-PLUS - `prosodyctl check` - Statistics - Improved TLS configuration - Lua 5.2 support - mod\_blocklist (XEP-0191) - mod\_carbons (XEP-0280) - Pluggable connection timeout handling - mod\_websocket (RFC 7395) - mod\_mam (XEP-0313) Removed ------- - mod\_privacy (XEP-0016) - mod\_compression (XEP-0138)