xmppcomponent_listener: Remove useless require of lxp default tip

util.xmllex: Decode XML entities

util.xmllex, util.xmppstream: It runs

mod_dialback: Use stanza:get_text() instead of directly accessing [1]

util.stanza: Ignore false xmlns

util.stanza: Fixes for xmllex-generated stanza objects

stanza_router: Replace xmlns == nil checks with 'not xmlns'

mod_saslauth: Use get_text() instead of directly accessing stanza child text nodes

mod_presence: Use get_text() instead of table.concat

util.xmppstream, util.xmllex: Basic test passes

Merge

Adding test for xmppstream

All correcthg diff util/xmppstream.lua

Tree structure now similar to prosody stanza format

util.xmllex: Add

util.xmppstream: Prepare for using xmllex

mod_pubsub: Correctly wrap the list of subscriptions in a pubsub element

util.xmppstream: Optimized stanza building by bypassing the stanza API.

util.sasl: Cache the calculated mechanisms set for SASL profiles (profile.mechanisms table).

prosody: Don't add a datamanager callback when anonymous_login=true (mod_auth_anonymous does this now).

hostmanager: Don't set host.disallow_s2s when anonymous_login=true (mod_auth_anonymous does this now).

mod_saslauth: Remove special handling for SASL ANONYMOUS, and let mod_auth_anonymous handle it.

usermanager: Assume authentication="anonymous" when anonymous_login=true.

util.sasl.*, mod_auth_*, mod_saslauth: Pass SASL handler as first parameter to SASL profile callbacks.

mod_storage_sql: Use util.json instead of util.serialization.

util.json: Initial commit.

mod_storage_sql: Log an error on query failure.

mod_storage_sql: Remove the subkey column from the Prosody table, and make the map store compatible with the key-value store.

mod_storage_sql: Dynamically replace backquotes with double quotes when connecting to PostgreSQL...

mod_storage_sql: Call commit() after all SQL statements, including SELECT, to get SQLite to drop its locks.

mod_storage_sql: Quote identifiers in SQL with backquotes, and use the empty string for NULL, and '=' instead of 'IS' for comparison, to work with MySQL's limitations...

Don't check priority in mod_offline

mod_message, mod_offline: Change message/offline/store -> message/offline/handle

mod_offline: Make sure mod_offline's store handler reports success vs failure.

mod_message: Send service-unavailable if offline storage fails.

mod_presence, mod_offline: Merge message/offline/delete with message/offline/broadcast.

core.offlinemanager, mod_message, mod_presence: Removed core.offlinemanager in favor of mod_offline.

modulemanager: Auto-load mod_offline.

util.pposix: Remove extraneous semicolon

util.encodings: Switch comment styles to build ok as ANSI C

util-src/Makefile: Change parameter order so that LDFLAGS always comes later than the input files

util-src/Makefile: Clean up and remove unnecessary all linking

configure: Don't add -llua to LDFLAGS, it's unnecessary

mod_saslauth: Handle session bind requests to the host, fixes OneTeam login

s2smanager: Destroy session on immediate failure of a connection attempt (e.g. inability to create sockets)

s2smanager: Handle DNS lookup error in response handler

s2smanager: send_to_host(): Handle already-destroyed session and bounce stanza accordingly

s2smanager: new_outgoing(): Destroy session if first connection attempt fails immediately (e.g. can't create sockets)

net.adns: Handle dns.query() failures, and pass error to handler

net.dns: resolver:query(): Handle getsocket() failures, and return true on success

net.dns: resolver:getsocket(): Return nil, err on failure

s2smanager: Give all new outgoing s2s sessions a close method by default (destroy_session)

s2smanager: Add a missing semi-colon

s2smanager: destroy_session(): Pass reason to retire_session() and return true on successful destruction

s2smanager: retire_session(): Add a 'reason' parameter

mod_pubsub: Include node in disco#items reply

s2smanager: session.send(): Return the result of send_to_host() (and incidentally make this a tail call \o/)

s2smanager: send_to_host(): Return false on failure, and true otherwise

mod_pubsub: Fix missing disco#items xmlns

util.pubsub: Return correct node in get_subscriptions()

mod_pubsub: Implement disco#info for nodes

util.filters: Add remove_filter_hook()

util.pubsub: Use correct node name when returning a list of multiple nodes in a subscriptions response

mod_pubsub: Implement get_subscriptions

mod_pubsub: Add get_subscriptions and get_subscriptions_other capabilities to default affiliations

mod_pubsub: Add add_subscription and get_subscriptions to feature_map

util.pubsub: Add service-wide subscription tracking, and add :get_subscriptions()

util.pubsub: Small code tidying for :get_subscription()

util.pubsub: Fix traceback when using autocreate-on-subscribe

mod_pubsub: Set normalize_jid instead of jids_equal

util.pubsub: Add service:jids_equal() and new config option normalize_jid

mod_pubsub: Fix a missing :up() from the last commit

mod_pubsub: Handle disco#items on nodes

util.pubsub: get_items(): When requesting a specific item, use the id as a key to mirror the multiple-item case

prosody: Catch a recursive Include error and print a more friendly error

configmanager: Filenames without a path are also relative to the config file path, not the current working directory

util.pubsub: Add service:set_node_capabilities()

util.xmppstream: Allow stream_ns = "" for parsing streams with no xmlns

Merge with 0.8

prosody.cfg.lua.dist: Add note about external gateways

prosody.cfg.lua.dist: Update for new logging config format

configmanager: Support for wildcards in Include directives

prosody, prosodyctl, util.dependencies: Split checking and logging of dependencies so we can check hard deps before the config and logging is loaded

util.httpstream: For HTTP client responses, changing properties responseversion and responseheaders to httpversion and httpheaders, to match HTTP server requests.

util.httpstream: A little cleanup of the HTTP path.

mod_pubsub: Use bare JID in get_affiliation

mod_pubsub: Skip false features in feature_map

util.pubsub: Fix nil global access in get_nodes()

mod_pubsub: Return disco#info stanza from build_disco_info()

mod_pubsub: Iterate over disco features in correct table

mod_pubsub: Build disco#info based on the methods provided by the pubsub service object. Add public set_service() method to change the service object used by the module.

mod_pubsub: Fix capabilities table from some debugging

mod_pubsub: Make the pubsub host an admin too

mod_pubsub: Update for latest util.pubsub and fix some bugs. New config options autocreate_on_publish, autocreate_on_subscribe and default_admin_affiliation.

util.pubsub: Too many changes to list or split sensibly. Added access control to all methods, with capabilities support. Renamed get() -> get_items() and changed it to return true, result on success. Support for autocreate_on_subscribe and autocreate_on_publish config options.

util.pubsub: Modify new() to take a config, and add a default config via a metatable

mod_pubsub: Add 'forbidden' error support

prosody.cfg.lua.dist: Add note about external gateways

prosody.cfg.lua.dist: Update for new logging config format

configmanager: Support for wildcards in Include directives

prosody, prosodyctl, util.dependencies: Split checking and logging of dependencies so we can check hard deps before the config and logging is loaded

util.httpstream: For HTTP client responses, changing properties responseversion and responseheaders to httpversion and httpheaders, to match HTTP server requests.

util.httpstream: A little cleanup of the HTTP path.

Merge with 0.8

mod_pubsub, util.pubsub: Remove from 0.8

Merge 0.8->trunk (uh-oh)

configmanager: Switch back to returning 'ok' to signal config load success - fixes config errors not being displayed

util.events: Remove an event's table when it has no more handlers.

mod_admin_adhoc: Support unloading multiple modules

mod_admin_adhoc: Support for reloading multiple modules

net/server_select.lua: Reduce select() timeout back to 1s

storagemanager: Don't always show fallback warning when using per-store config

prosodyctl: Add dummy lock/unlock_globals() until util.startup comes along

mod_storage_sql: Fix a couple of bugs in "JSON" decoding

util.prosodyctl: Initialize storagemanager on hosts we modify

storagemanager: Log warning when loading the storage provider plugin fails

util-src/Makefile, util-src/encodings.c{,pp}: Port ICU code to C, rename encodings.cpp back to .c and amend the Makefile accordingly

usermanager: Fixed a possible traceback when is_admin() was used on a component.

prosody.cfg.lua.dist: Update to reflect new mod_admin_* modules

util.stanza: Iterate on childtags instead of all childs.

Make libidn default when not specifiying a IDN lib.

Fix lua lib name in LDFLAGS.

util.encodings: Support for ICU for IDNA operations.

mod_pubsub: Preserve service object on module reload

mod_pubsub: Handle disco#info and disco#items

util.pubsub: Add service:get_nodes()

modulemanager, mod_console: Rename mod_console -> mod_admin_telnet - add compatibility code to modulemanager for existing configs

net.httpserver: Default 'ports' = {5280}

net.xmppclient_listener: Imports and global cleanup.

net.xmppserver_listener: Removed unnecessary import of lxp.

net.xmppserver_listener: Removed unused variables and imports.

net.xmppserver_listener: Made some globals local.

net.xmppcomponent_listener: Move session creation from listener.onincoming to listener.onconnect.

net.xmppcomponent_listener: Made some globals local.

core.loggingmanager: Updated to use termcolours.getstyle instead of termcolours.getstring for console logging.

util.termcolours: Added setstyle(str), which works on Windows too.

util-src/windows.c: Added get_consolecolor, set_consolecolor.

net.dns: Clean up tostring() of returned records, as a result PTR records can now be tostring()'d

net.dns: Add resolver:tohostname() and dns.tohostname()

util.serialization: Proper serialization of Infinity, -Infinity and NaN.

mod_storage_sql: Use 'IS' for comparison instead of '=', to avoid SQL's NULL insanity.

mod_storage_sql: Fixed the deserialization of string-typed values.

prosodyctl: Added and updated some comments and some semicolons, to match main prosody executable.

prosodyctl: Read PROSODY_SRCDIR and PROSODY_PLUGINDIR environment variables, to match main prosody executable.

prosody: Added a comment, to match prosodyctl.

prosodyctl: Added support for --config command line argument, and multiple config parsers (to match the main prosody executable).

mod_pep: Fixed a traceback when non-local users send presence.

mod_pep: Handle the case where local contacts send directed presence with caps hash.

util.serialization: Implemented deserialize().

storagemanager: When we have a cached data driver, we are supposed to use it.

mod_storage_sql: Auto-initialize SQLite3 database.

mod_storage_sql: Default value for option sql = { driver = "SQLite3", database = "prosody.sqlite" }.

mod_storage_sql: Fixed a typo.

mod_storage_sql: Initial commit of new SQL data driver.

storagemanager: Hook "host-activated", to make sure we are notified about data drivers.

storagemanager: Fixed a nil global access.

util.stanza: Change get_error() to return nil rather than '' for no text

mod_bosh: Fixes to the session creation response - add mandatory 'wait' attribute, remove optional 'maxpause' which we don't support, and reformat the code to prevent long lines and wacky indentation. Fixes #219.

prosodyctl: Make the 'restart' command start Prosody even if it wasn't already running

util.datamanager: Return an error string when pcall fails on a loaded list file.

util.datamanager: When failing to load a list file, and the file exists, log an error, and return nil, error.

usermanager: Removed redundant import of util.datamanager and util.hashes.

util.ztact: Removed.

net.dns: Removed dependency on util.ztact by moving ztact.get/set in.

mod_console: Removed redundant code for host:activate() and host:deactivate(), now that hostmanager has error checking.

hostmanager: Improved error handling.

hostmanager: deactivate() now returns true on success.

hostmanager: activate() now gets the host config from configmanager when a config isn't given.

certs/Makefile: Remove -c flag to chmod, which appears to be a GNUism (thanks Kev)

prosody: Don't attempt to load core.xmlhandlers in the main file. It no longer exists.

xmlhandlers: DELETED.

util.prosodyctl: Prep JIDs before checking whether they exist (thanks tja)

tools/xep227toprosody.lua: Rename ns_xep227 to xmlns_xep227 for consistency with main Prosody code

tools/xep227toprosody.lua: Convert to use util.xmppstream

util.xmppstream: Expose ns_separator and ns_pattern

mod_bosh: Switch to util.xmppstream from xmlhandlers

xmppcomponent_listener: Switch to util.xmppstream from xmlhandlers

prosody: Added a stub implementation of core.componentmanager to the package.loaded table (re-commiting, as this was accidentally removed).

certs/openssl.cnf: Change countryName from UK to GB

certs/Makefile: Add .PRECIOUS to stop make deleting the key as an intermediate file (thanks deryni/Zash)

certs: Add a default OpenSSL configuration file, and a Makefile.

mod_pubsub: Ensure <item> is in correct scope when broadcasting an event

mod_pubsub: Support item retraction

mod_pubsub, util.pubsub: Support for unsubscribing

mod_pubsub: Use pubsub_error_reply everywhere

util.xmppstream: Fix logger name.

mod_disco: Don't add caps hash to stream features on unauthenticated connections.

mod_proxy65: Add service discovery identity and feature, to help out mod_disco when loaded on a normal host.

mod_proxy65: Cleaned up stanza processing a little.

mod_proxy65: s:len() -> #s.

mod_proxy65: Make some globals local.

mod_proxy65: :sub(n):byte() -> :byte(n).

mod_proxy65: Allow loading on normal hosts.

mod_proxy65: Updated to use sub-events. Now only hooks what it needs to.

net.server_select: Set select() timeout to 3600 by default.

net.server_select: Made another global local.

net.server_select: Made some globals local.

mod_bosh: Use util.timer for timers instead of server.addtimer.

util.timer: Activate higher timer precision.

net.server_select: Make changes required for sub-second timer precision.

fallbacks/lxp.lua: Pure Lua pseudo-XML parser. Implements the same API as LuaExpat.

mod_iq: Fix an extra character in previous commit...

mod_iq: Don't hook 'iq/full' on components.

modulemanager: Allow components to inherit mod_iq. This allows modules loaded on components to hook IQ stanza sub-events ("iq-set/bare/xmlns:tag", etc).

mod_proxy65: Give the 'iq/host' stanza handler a negative priority, to allow mod_iq to process the events first.

MUC: Give stanza handlers a negative priority, to allow mod_iq to process them first.

mod_component: Give stanza handlers a negative priority, to allow mod_iq to process them first.

mod_iq: Don't stop event dispatch for unhandled IQ errors and results (this lets negative priority handlers intercept the events).

mod_pubsub, util.pubsub: Support node creation

mod_pep: Remove PEP subscriptions on getting a presence unsubscribe.

mod_pep: Fixed regression where PEP messages were not correctly being broadcasted on caps hash change.

mod_pep: Fixed a nil access (thanks Zash).

mod_disco: Fixed: Service discovery features were not being removed on module unload (issue #205).

mod_pep: Optimised PEP requests for disco info on caps change (issue #150).

storagemanager: Only show fallback warning if storage was configured to use another backend and it failed

storagemanager: Return driver from load_driver() if successful

mod_iq: Optimized a bit more (fewer table accesses).

mod_iq: Optimized a bit (fewer table accesses).

mod_iq: Extra IQ get and set sub-events are now fired: "iq-{get,set}/{host,self,bare}/xmlns:tag" (when "iq/{host,self,bare}/xmlns:tag" is unhandled).

storagemanager: Import type()

storagemanager: Import util.multitable again

storagemanager: Fix syntax error

mod_pep: Updated disco#info result handler to use new event name format.

mod_iq: IQ error and result sub-events are now "iq-{error,result}/{host,self,bare}/id" (previously "iq/{host,self,bare}/id").

configmanager: Switch back to returning 'ok' to signal config load success - fixes config errors not being displayed

Merge with Florob

util.events: Remove an event's table when it has no more handlers.

mod_admin_adhoc: Support unloading multiple modules

mod_admin_adhoc: Support for reloading multiple modules

net/server_select.lua: Reduce select() timeout back to 1s

storagemanager: Don't always show fallback warning when using per-store config

prosodyctl: Add dummy lock/unlock_globals() until util.startup comes along

mod_storage_sql: Fix a couple of bugs in "JSON" decoding

util.prosodyctl: Initialize storagemanager on hosts we modify

storagemanager: Log warning when loading the storage provider plugin fails

util-src/Makefile, util-src/encodings.c{,pp}: Port ICU code to C, rename encodings.cpp back to .c and amend the Makefile accordingly

usermanager: Fixed a possible traceback when is_admin() was used on a component.

prosody.cfg.lua.dist: Update to reflect new mod_admin_* modules

util.stanza: Iterate on childtags instead of all childs.

Merge Tobias->trunk

Make libidn default when not specifiying a IDN lib.

Fix lua lib name in LDFLAGS.

util.encodings: Support for ICU for IDNA operations.

mod_pubsub: Preserve service object on module reload

mod_pubsub: Handle disco#info and disco#items

util.pubsub: Add service:get_nodes()

modulemanager, mod_console: Rename mod_console -> mod_admin_telnet - add compatibility code to modulemanager for existing configs

net.httpserver: Default 'ports' = {5280}

net.xmppclient_listener: Imports and global cleanup.

net.xmppserver_listener: Removed unnecessary import of lxp.

net.xmppserver_listener: Removed unused variables and imports.

net.xmppserver_listener: Made some globals local.

net.xmppcomponent_listener: Move session creation from listener.onincoming to listener.onconnect.

net.xmppcomponent_listener: Made some globals local.

core.loggingmanager: Updated to use termcolours.getstyle instead of termcolours.getstring for console logging.

util.termcolours: Added setstyle(str), which works on Windows too.

util-src/windows.c: Added get_consolecolor, set_consolecolor.

net.dns: Clean up tostring() of returned records, as a result PTR records can now be tostring()'d

net.dns: Add resolver:tohostname() and dns.tohostname()

util.serialization: Proper serialization of Infinity, -Infinity and NaN.

mod_storage_sql: Use 'IS' for comparison instead of '=', to avoid SQL's NULL insanity.

mod_storage_sql: Fixed the deserialization of string-typed values.

prosodyctl: Added and updated some comments and some semicolons, to match main prosody executable.

prosodyctl: Read PROSODY_SRCDIR and PROSODY_PLUGINDIR environment variables, to match main prosody executable.

prosody: Added a comment, to match prosodyctl.

prosodyctl: Added support for --config command line argument, and multiple config parsers (to match the main prosody executable).

mod_pep: Fixed a traceback when non-local users send presence.

mod_pep: Handle the case where local contacts send directed presence with caps hash.

util.serialization: Implemented deserialize().

util.x509: "certverification" -> "x509".

storagemanager: When we have a cached data driver, we are supposed to use it.

core.s2smanager, mod_console, mod_saslauth, util.certverification: rename util.certverification to util.x509

mod_storage_sql: Auto-initialize SQLite3 database.

mod_storage_sql: Default value for option sql = { driver = "SQLite3", database = "prosody.sqlite" }.

mod_storage_sql: Fixed a typo.

mod_storage_sql: Initial commit of new SQL data driver.

storagemanager: Hook "host-activated", to make sure we are notified about data drivers.

storagemanager: Fixed a nil global access.

util.stanza: Change get_error() to return nil rather than '' for no text

mod_bosh: Fixes to the session creation response - add mandatory 'wait' attribute, remove optional 'maxpause' which we don't support, and reformat the code to prevent long lines and wacky indentation. Fixes #219.

prosodyctl: Make the 'restart' command start Prosody even if it wasn't already running

util.datamanager: Return an error string when pcall fails on a loaded list file.

util.datamanager: When failing to load a list file, and the file exists, log an error, and return nil, error.

usermanager: Removed redundant import of util.datamanager and util.hashes.

util.ztact: Removed.

net.dns: Removed dependency on util.ztact by moving ztact.get/set in.

mod_console: Removed redundant code for host:activate() and host:deactivate(), now that hostmanager has error checking.

hostmanager: Improved error handling.

hostmanager: deactivate() now returns true on success.

hostmanager: activate() now gets the host config from configmanager when a config isn't given.

certs/Makefile: Remove -c flag to chmod, which appears to be a GNUism (thanks Kev)

prosody: Don't attempt to load core.xmlhandlers in the main file. It no longer exists.

xmlhandlers: DELETED.

util.prosodyctl: Prep JIDs before checking whether they exist (thanks tja)

tools/xep227toprosody.lua: Rename ns_xep227 to xmlns_xep227 for consistency with main Prosody code

tools/xep227toprosody.lua: Convert to use util.xmppstream

util.xmppstream: Expose ns_separator and ns_pattern

mod_bosh: Switch to util.xmppstream from xmlhandlers

xmppcomponent_listener: Switch to util.xmppstream from xmlhandlers

prosody: Added a stub implementation of core.componentmanager to the package.loaded table (re-commiting, as this was accidentally removed).

certs/openssl.cnf: Change countryName from UK to GB

certs/Makefile: Add .PRECIOUS to stop make deleting the key as an intermediate file (thanks deryni/Zash)

Merge with Zash

certs: Add a default OpenSSL configuration file, and a Makefile.

mod_pubsub: Ensure <item> is in correct scope when broadcasting an event

mod_pubsub: Support item retraction

mod_pubsub, util.pubsub: Support for unsubscribing

mod_pubsub: Use pubsub_error_reply everywhere

util.xmppstream: Fix logger name.

mod_disco: Don't add caps hash to stream features on unauthenticated connections.

mod_proxy65: Add service discovery identity and feature, to help out mod_disco when loaded on a normal host.

mod_proxy65: Cleaned up stanza processing a little.

mod_proxy65: s:len() -> #s.

mod_proxy65: Make some globals local.

mod_proxy65: :sub(n):byte() -> :byte(n).

mod_proxy65: Allow loading on normal hosts.

mod_proxy65: Updated to use sub-events. Now only hooks what it needs to.

net.server_select: Set select() timeout to 3600 by default.

net.server_select: Made another global local.

net.server_select: Made some globals local.

mod_bosh: Use util.timer for timers instead of server.addtimer.

util.timer: Activate higher timer precision.

net.server_select: Make changes required for sub-second timer precision.

fallbacks/lxp.lua: CRLF -> LF.

fallbacks/lxp.lua: Pure Lua pseudo-XML parser. Implements the same API as LuaExpat.

mod_iq: Fix an extra character in previous commit...

mod_iq: Don't hook 'iq/full' on components.

modulemanager: Allow components to inherit mod_iq. This allows modules loaded on components to hook IQ stanza sub-events ("iq-set/bare/xmlns:tag", etc).

mod_proxy65: Give the 'iq/host' stanza handler a negative priority, to allow mod_iq to process the events first.

MUC: Give stanza handlers a negative priority, to allow mod_iq to process them first.

mod_component: Give stanza handlers a negative priority, to allow mod_iq to process them first.

mod_iq: Don't stop event dispatch for unhandled IQ errors and results (this lets negative priority handlers intercept the events).

mod_pubsub, util.pubsub: Support node creation

mod_console: Fix to import cert_verify_identity (util.certverification)

certmanager: Add required verify flags for cert verification if LuaSec (probably) supports them

mod_console: Add s2s:showcert() command to show the certificate for a domain

mod_pep: Remove PEP subscriptions on getting a presence unsubscribe.

mod_pep: Fixed regression where PEP messages were not correctly being broadcasted on caps hash change.

mod_pep: Fixed a nil access (thanks Zash).

mod_disco: Fixed: Service discovery features were not being removed on module unload (issue #205).

mod_pep: Optimised PEP requests for disco info on caps change (issue #150).

s2smanager: Check for getpeercertificate availability (for old LuaSecs)

storagemanager: Only show fallback warning if storage was configured to use another backend and it failed

storagemanager: Return driver from load_driver() if successful

Merge with trunk

mod_iq: Optimized a bit more (fewer table accesses).

mod_iq: Optimized a bit (fewer table accesses).

mod_iq: Extra IQ get and set sub-events are now fired: "iq-{get,set}/{host,self,bare}/xmlns:tag" (when "iq/{host,self,bare}/xmlns:tag" is unhandled).

storagemanager: Import type()

storagemanager: Import util.multitable again

storagemanager: Fix syntax error

Merge darkrain->trunk

mod_pep: Updated disco#info result handler to use new event name format.

mod_iq: IQ error and result sub-events are now "iq-{error,result}/{host,self,bare}/id" (previously "iq/{host,self,bare}/id").

mod_console: Denote services whose identity matches their (valid/trusted) certificate as 'secure'

s2s: SASL EXTERNAL

s2smanager: Compatibility hack for when not using dialback

net.server_event: API parity with net.server_socket

Rename storage/mod_ejabberd to mod_storage_sql_ejabberd. Also rename configuration option. Untested.

storage/mod_storage: Remove, obsolete

storagemanager: Much refactoring and renaming of options. Untested, needs storage plugin(s) to be brought into line.

util.datetime: Fix so that the timestamp returned is always in UTC, timezone offsets were going in the wrong direction

util.datetime: Fixes for more liberal timezone parsing - colon and minutes are both (independantly) optional (thanks Zash)

mod_pubsub, util.pubsub: Support for fetching items

util.template: Don't add stanza.last_add. 20% faster.

tests/test_util_stanza.lua: Allow stanza.last_add to be nil.

util.stanza, util.xmppstream, core.xmlhandlers: Allow stanza.last_add to be nil, and set it nil by default. Saves a table allocation per-element. 20% faster stanza building.

util.template: Rewritten to be much faster than the util.stanza stanza building API.

.hgignore: Ignore *.diff.

.hgignore: Ignore Windows compilation artifacts.

net.xmpp{client,server,component}_listener: s/xml-not-well-formed/not-well-formed/ as per latest bis drafts.

util.xmppstream: Preserve the stream content namespace on descendents of elements which are in another namespace.

MUC: Include the user's current presence contents when broadcasting a role change.

MUC: Include the user's current presence contents when broadcasting an affiliation change.

prosodyctl: Give hosts type = 'local'

MUC: Change room name and description properly

MUC: Fixed: Variable referencing the host session wasn't initialized.

prosodyctl, util.prosodyctl: Show error when mod_posix is not enabled and an attempt is made to query Prosody's status (thanks stever)

util.pubsub: Add :get_subscription() to return the current subscription for a JID, if any

util.filters: Support for 'filter hooks' that get called when a session is initialized for filters

Merge backout

Backed out changeset bfc47564aaef (No need for _M with module.environment)

mod_pubsub: Use module.environment to reference the module's environment

mod_pubsub: Expose 'service'

modulemanager: Inside plugins, have global _M as a reference to the module's environment

mod_pubsub: It's aliiiive!

mod_component: Logging tweaks.

mod_component: Use module:get_option() instead of configmanager.

mod_component: Rearranged the code a little.

mod_component: Return true from stanza handler to indicate that we actually did handle the stanza.

mod_console: Don't allow bang bang as the first command in a session, or when the last command is unknown (fixes #218)

configmanager: Change parser API again to pass a config table to insert settings to. Fixes Include(). (Thanks Zash/answerman)

usermanager: Don't load auth modules for components.

MUC: Grant membership when inviteing someone into a members-only room.

configmanager: Update Include and RunScript directives to support paths relative to the (current!) config file

prosody, configmanager, certmanager: Relocate prosody.resolve_relative_path() to configmanager, and update certmanager (the only user of this function)

modulemanager, usermanager: Removed hooks for the 'component-activated' event (components now fire 'host-activated').

mod_proxy65: Use module:get_option() instead of configmanager.

componentmanager: Removed.

prosody: Added a stub implementation of core.componentmanager to the package.loaded table.

prosody: Removed all references to componentmanager from Prosody, except the main componentmanager file.

componentmanager: Removed most of the code. Stub implementations of register_component and deregister_component remain.

componentmanager: Removed get_children(host).

hostmanager: Don't include hosts with '@' or '/' in the name in the get_children(host) result.

mod_disco: Updated to use hostmanager.get_children instead of componentmanager.get_children.

hostmanager: Added function get_children(host) which copies componentmanager.get_children(host).

modulemanager: Return an error when loading a module on a non-existent host, don't create the host. Removes dependecy on componentmanager.

hostmanager, componentmanager: hostmanager now handles component initialization at server start, not componentmanager.

modulemanager: load_modules_for_host(): For components, the inherited modules are the intersection of the inheritable and global modules lists, not the difference.

modulemanager: load_modules_for_host(): Inherit 'tls' and 'dialback' from global modules list for components, and load the component module. Also refactored to use util.set.

hostmanager: Added support for components to hostmanager.activate().

MUC: Only send status code 110 (entering non-anonymous room) to the occupant themselves, not to other occupants.

MUC: Added some more missing :up()s to the stanza building for presence broadcasts (thanks again Zash).

MUC: Parse submitted form with util.dataforms

MUC: Added a missing :up() to the stanza building for presence broadcast (thanks Zash).

MUC: Return true from the stanza handler to suppress error responses.

modulemanager: Fixed: Locally defined pcall wasn't returning return values of the called function.

componentmanager, hostmanager, modulemanager, mod_component: Got rid of the useless hosts[*].connected property.

componentmanager, stanza_router: Get rid of componentmanager.handle_stanza().

prosody: Ensure componentmanager is loaded in the main file.

componentmanager: Removed SSL context creation (mod_tls handles that now).

mod_tls: Let hosts without an 'ssl' option inherit it from their parent hosts.

net.xmppcomponent_listener: Removed unnecessary and problematic cleanup code.

mod_component: Updated to use events for hooking stanzas instead of the component stanza handler, and the on_destroy callback.

MUC: Handle missing <value/> for <field type='boolean'/> in config form submissions.

mod_component: Send back a <conflict/> stream error when multiple sessions attempt to bind.

net.xmppcomponent_listener: Call session:on_destroy() on session disconnect.

MUC: Preserve the global rooms table through reloads.

MUC: Expose the rooms table as a global 'rooms'.

MUC: Allow restricting room creation to local JIDs (thanks thomas.mangin).

mod_tls: Pass the hostname rather than host session to certmanager.create_context() (thanks darkrain)

configmanager: Atomic reloads, and some other internal changes to achieve this

mod_disco: Renamed the 'session' property of the account-disco-info and account-disco-items events to 'origin' for consistency.

certmanager, hostmanager, mod_tls: Move responsibility for creating per-host SSL contexts to mod_tls, meaning reloading certs is now as trivial as reloading mod_tls

util.httpstream: Added support for chunked transfer encoding.

net.http: Removed old HTTP parser, and updated to use util.httpstream.

util.httpstream: Fixed a possible string to number comparison error.

util.httpstream: Don't attempt to read response body for HEAD requests, or when status code indicates no body is present.

util.httpstream: Added support for an options callback, to allow passing per-message options to the parser.

util.httpstream: A little refactoring of the coroutine control flow.

util.httpstream: Added support for HTTP response parsing.

util.httpstream: Fixed a nil variable access introduced in the last commit.

util.httpstream: Move HTTP header parsing into its own function.

componentmanager: Removed unused function set_component_handler.

MUC: Use events for hooking stanzas instead of the component stanza handler.

mod_proxy65: Removed useless checks from the event handler.

mod_proxy65: Use "iq/host" event for hooking stanzas instead of the component stanza handler.

mod_console: Keep global variable assignments sandboxed by default.

util.logger: Remove support for a global writer (setwriter) to try and balance the forces...

mod_posix: Remove redundant import of logger.setwriter()

util.logger: Remove my precious premature optimisation :(

mod_saslauth: Allow restarting SASL negotiation from scratch.

mod_saslauth: Separated processing of <auth/> and <response/> elements, and return proper error on out-of-order <response/> elements.

mod_saslauth: Moved SASL mechanism selection and CDATA handling into separate functions.

util.sasl, util.sasl_cyrus: Mechanism selection cleaned up to be more consistent.

util.sasl, util.sasl_cyrus: Load mechanisms list early rather than lazily, as they are always loaded anyway.

mod_saslauth: Handle SASL <abort/> properly.

componentmanager: Removed an unused third parameter from the register_component function.

util.template: Optimized to be almost as fast as manual stanza building.

util.template: Initial commit. A template library for XML stanzas.

net.dns: Fixed a traceback when util/windows.dll is unavailable on windows.

net.server_select: Restore real sendbuffer() before calling onconnect handler, in case onconnect sends data and the socket is still writeable (causing stack overflow into sendbuffer()/onconnect())

mod_bosh: Don't add a Content-Type header to the HTTP OPTIONS reply.

ejabberdsql2prosody: Added a global 'prosody' table to fix a traceback.

Monster whitespace commit (beware the whitespace monster).

modulemanager, stanza_router: Moved modulemanager.handle_stanza to stanza_router, as a local function handle_unhandled_stanza. modulemanager is no longer a dependency of stanza_router.

modulemanager: Removed another legacy events API (add_event_hook), and related code.

mod_posix: Updated to use the new events API.

modulemanager: Removed legacy events API, and related code.

mod_saslauth: Updated to use the new events API.

mod_dialback: Fixed indentation.

mod_dialback: Updated to use the new events API.

mod_compression: Updated to use the new events API.

mod_component: Updated to use the new events API.

modulemanager: Removed add_iq_handler() from the plugin API.

mod_register: Updated to use the new events API.

mod_legacyauth: Limit authentication to unauthenticated client connections.

mod_legacyauth: Updated to use the new events API.

mod_roster: Cleaned up some unused variables and global accesses.

mod_roster: Updated to use the new events API.

mod_saslauth: Improved logging a bit.

mod_saslauth: Updated to use the new events API.

mod_private: Updated to use the new events API. Smaller, more robust.

Merge hoelzro->trunk

Alter mod_offline to respect negative priority resources

Merge hoelzro->trunk

Don't send offline messages to resource with negative priorities

MUC: Use util.dataforms to generate forms

MUC: fix timezone support when sending history

configmanager: Allow VirtualHost/Component definitions to be followed by a table of config options

core.loggingmanager: Logging config simplification - allow [level] = filename and *sink to appear in the config table

net.dns: Support for parsing PTR records

net.dns: Add 'force' parameter to resolver:feed() to force decoding a packet even if it doesn't match an outstanding request

mod_adhoc: Answer disco#info for node=xmlns_cmd

MUC: Make the room node be the default room name (thanks Zash).

Merge with trunk.

MUC: Added a 'Description' property (muc#roomconfig_roomdesc)

MUC: Added a 'Name' property (muc#roomconfig_roomname)

MUC: Fixed traceback on presence errors lacking a condition.

net.xmppcomponent_listener: Fixed a possible traceback in component disconnect handling.

net.xmppcomponent_listener: Specify missing log level for a log statement.

net.xmppcomponent_listener, mod_component: Removed useless undocumented option 'component_address'.

util.stanza: Make the current element <message> instead of <body> when body text is passed to st.message().

util.events: Event handler indices are now built lazily (faster server startup for large number of hosts).

util.events: Create new index on handler change instead of modifying existing one (this makes util.events fully reentrant).

util.events: Fixed the exposed API for adding/removing sets of event handlers.

util.events: Removed dispatcher creation functions (these weren't being used).

net.httpserver: Removed old HTTP parser, and updated to use util.httpstream.

util.httpstream: Refactored and simplified code to improve readability.

util.httpstream: Removed unused variables.

util.httpstream: Initial commit of the new HTTP parser.

prosody.cfg.lua.dist: Small wording fix in comment (thanks darkrain)

mod_bosh: Fix traceback when initiating a BOSH session to an unknown host

net.server_select: Add server.step() to run through a single iteration of the event loop

prosody.cfg.lua.dist: Add mod_adhoc and mod_admin_adhoc to the default config

s2smanager: Don't fire s2sin-destroyed for sessions that were never fully established (thanks Thomas)

s2smanager: Fire s2s{in,out}-destroyed when s2s connections are destroyed

mod_admin_adhoc: New module with merged functonality of mod_adhoc_cmd_admin and mod_adhoc_cmd_modules (of prosody-modules fame)

mod_ping: Add ad-hoc command

mod_adhoc: remove 0.7 compat code

mod_adhoc: Fix passing data to util.dataforms

mod_version: Use pposix.uname() if available and os_version_command not set

util.pposix: uname(): Fix to push nil,err in case of error

util.pposix: Add pposix.uname(), bump version

util.jid: Fix parsing of JIDs with no nodepart and an @ in the resourcepart (thanks seth)

tests/test_util_jid.lua: Add more tests for JID splitting

util.stanza: stanza:matched_children() -> stanza:matching_tags()

util.stanza: Add stanza:maptags() to apply a function over child tags (return nil to remove tag from stanza)

s2smanager: Fire s2s{in,out}-established when new s2s connections are ready

util.stanza: Optimisation, remove useless if...then in stanza:children() iterator

util.stanza: Add stanza:matched_children(name, xmlns) [name suggestions welcome]

net.httpserver: Join multiple headers with the same name as per RFC (thanks darkhippo)

mod_bosh: Support for reading the client's real IP through HTTP proxies from X-Forwarded-For

util.pposix, prosodyctl, mod_posix: Add initgroups() function, and bump module version. prosodyctl inits groups with the groups of prosody_user. (thanks dbb)

net.http: Add http.formencode() for www-form-urlencoded from an array of fields (thanks dersd)

componentmanager: Relocate disallow_s2s to its correct position (thanks darkhoptipomatus)

mod_saslauth, mod_auth_cyrus, util.sasl_cyrus: Moved cyrus account provisioning check out of mod_saslauth.

util.sasl_cyrus: Spaces -> tabs.

usermanager: Get rid unused Cyrus SASL related code.

mod_auth_internal_plain: Get rid of all checks for Cyrus SASL.

mod_saslauth: Get rid of the sasl_backend option (use auth modules instead).

mod_saslauth: Get rid of most Cyrus SASL related code (use authentication='cyrus' instead).

componentmanager: Support the 'disallow_s2s' option for components too (thanks darkhopatomopus)

net.server: Don't load configmanager if not running inside Prosody, assume server_select

mod_bosh: Don't adjust rid when creating a session, as this is no longer necessary and causes a log message ('rid too large') to be erroneously printed, fixes #203

sessionmanager, s2smanager: Give resting sessions a pass-through filter, fixes #202

net.server_select, net.server_event: Remove set_mode() call from server.link()... it can cause the last chunk of data to be discarded if shorter than buffersize (thanks to Zash for the debugging)

mod_adhoc: Answer disco#info (This is a MUST in XEP-0050)

mod_adhoc: Code restructuring

util.logger: Remove support for the 'log_sources' option, to remove a dependency on configmanager. I think the equivalent of log_sources can be done with the advanced logging config.

mod_auth_internal_hashed: Fix deleting users

mod_privacy: Fix typo causing <active/> to never be send

mod_console: Add host:* commands to help (thanks Zash)

tests/test_util_jid.lua: Better formatting, comments, and stop giving 5 arguments to a 4-argument function (thanks Asterix :) )

mod_bosh: Fix to properly ignore repeated requests

mod_bosh: Small change to use variable instead of hard-coded xmlns

mod_bosh: Much improve session:close() for BOSH sessions, so it now matches in usage normal session:close()

mod_bosh: Add error callback for xmlhandlers, to handle the case of invalid or unusable XML in the request payload

MUC: Fixed: Unavilable presence was not being broadcasted for banned users in some cases (thanks Zash).

MUC: Return correct error to non-members attempting to enter a members-only room.

util.xmppstream: Removed some useless property assignments.

util.sasl_cyrus: Make multi-step SASL mechanisms work correctly.

util.sasl: Simplified some code a bit.

util.sasl, util.sasl_cyrus: Removed a ton of unused variables.

eventmanager: REMOVE!!!

mod_bosh: Remove dependency on eventmanager

loggingmanager: Remove (redundant!) dependency on eventmanager

sessionmanager: Remove dependency on eventmanager

s2smanager: Remove dependency on eventmanager

componentmanager: Remove dependency on eventmanager

hostmanager: Remove dependency on eventmanager

modulemanager: Remove dependency on eventmanager

s2smanager: brackets, just to be sure :)

s2smanager: Only bounce real stanzas on s2s failure, not dialback and friends (thanks elghinn)

util.datetime: Added implementation for function parse().

storage/mod_ejabberd: Reorganized some code.

util.sasl_cyrus: Cleanup.

util.sasl: Removed method:forbidden() and its side effects.

util.sasl_cyrus: Removed method:forbidden().

mod_auth_*: Fixed copyright headers.

util.xmppstream: Add set_session() method to change the session that a stream is associated with

net.xmppclient_listener: Add associate_session(conn, session) to change the session a connection is associated with

net.server_event: Remove some debug messages

mod_version: Leave out the os element if hide_os_type is set

mod_version: Make the command used to get OS version configurable

usermanager: Fix two nil global accesses

mod_saslauth: Fixed a nil global access.

mod_saslauth: Check for unencrypted PLAIN auth in mod_saslauth instead of the SASL handler (makes it work for Cyrus SASL).

mod_saslauth: Move mandatory encryption enforcement to before sasl_handler:select().

storage/mod_ejabberd (and associated library): Initial commit.

storage/mod_xep0227: Initial commit.

prosody: Enable storage manager.

prosody.cfg.lua.dist: Fixed trailing whitespace.

util.pluginloader: Remove useless datamanager dependency.

util.pluginloader: Fix loading of plugins, plugin libraries and resources in subfolders (e.g., when loading 'a/b', load 'a/mod_b.lua', and not 'mod_a/b.lua').

util.roster: Remove, not going this route now

mod_message: Discard headline messages sent to offline full JIDs (to follow latest spec updates).

mod_console: Override dofile() in the console environment (this lets print() print to the console session for example).

tests: Added tests for util.sasl.scram.Hi().

util.sasl.scram: Made function Hi public.

mod_console: Added support for multiple arguments to print().

storagemanager: Fixed a nil access.

prosody.resolve_relative_path: Updated to take a parent path to resolve against.

storagemanager: Initial commit.

Merge 0.7->trunk

certmanager: Don't disable LuaSec and future cert loading on failure, and add error messages to the no LuaSec/config cases (thanks Jakob)

net.server_select: Remove 'now' parameter from starttls(), and base it on whether the sendbuffer is empty instead

mod_tls: Remove extraneous flag to starttls() for s2sout connecections

net.server_event: Fix to not call onconnect a second time after the SSL handshake for starttls connections (thanks Flo)

usermanager, mod_auth_internal_hashed, mod_legacyauth: New order of parameters for usermanager.test_password - username, host, password

mod_register: Drop useless depencency on datamanager.

MUC: Store the nick (full room JID) which set the subject, and send subject to occupants from that JID.

util.iterators: Add skip() to skip the first n items of an iterator

mod_saslauth: Got rid of undocumented and useless 'sasl_realm' config option (was only used for anonymous auth, and that didn't make sense).

Merge with trunk.

mod_auth_internal_hashed: Fixed SCRAM-SHA-1 mechanism to not traceback on non-existent users.

MUC: No need to call is_admin twice now, global admins are admins on hosts

net.server_event: Remove debug logging from dummy onstatus handler

mod_saslauth: Cleaned up unused requires.

mod_saslauth: A little cleanup for anonymous_login.

configmanager: Remove dependency on eventmanager, and global 'prosody' object

s2smanager: Handle disallow_s2s for incoming streams as well as outgoing

net.server_select: Ensure that onconnect is called for server sockets as well as clients, rather than onincoming. Fixes mod_console traceback, issue #197

Merge Florob->trunk

util.dataforms: Add list-multi support

util.dataforms: Capability to set default for list-single

Merge Zash->trunk

mod_proxy65: Use util.jid.compare() and remove some clutter

Merge Zash->trunk

util.jid: compare() added, with some tests.

util.sasl.scram: Reference actual RFC instead of the draft.

util.sasl, util.sasl_cyrus: s/self.mechanisms()/self:mechanisms()/ in method:select().

Merge with backout

Backed out changeset 598c33a99a31 (already fixed a better way)

certmanager: Fix to handle the case of no SSL configuration at all

certmanager: Added copyright header.

certmanager: Defined default_capath to prevent a global nil access.

certmanager: Use an empty table as the default ssl config when a global 'ssl' config option isn't specified (fixes a top-level traceback on startup).

util.sasl, util.sasl_cyrus: Use method:mechanisms() in method:select(), instead of using the mechanisms list directly (fixes a traceback).

util.sasl, util.sasl_cyrus: Updated method:mechanisms() to cache and re-use list of mechanisms.

util.sasl: Use the proper session-specific table of mechanisms when selecting a mechanism, and not the global table.

SASL: Simplified sasl_handler:mechanisms() to return a set, and not an array.

usermanager: Return a non-nil SASL handler from the null auth provider (fixes a traceback).

MUC: Fixed a traceback introduced in hg:bdc325ce9fbc.

net.dns: Call :cancel() on the current resolver instead of the prototype

util.roster: Initial skeleton commit

loggingmanager: Add reload_logging() method, which gets called on any config reload, to reset util.logger and remove and re-add all sink types to perform a full reload of the logging system without a restart.

util.logger: Add reset() method to clear all sinks

certmanager: Remove debug logging accidentally committed

certmanager: Adjust paths of SSL key/certs to be relative to the config file, fixes #147

prosody: Add prosody.resolve_relative_path() helper to change relative paths to be relative to the config file

mod_httpserver: Serve index.html if a request is made for a directory and it contains one (thanks Brian Cully)

configure: Make it possible to override ostype presets with values specified later on the command-line

configure: Fix ostype=freebsd for ./configure (thanks dersd for reporting and n0nsense for testing the fix!)

mod_saslauth: Rename variable 'aret' to 'ok' as per convention

mod_disco: Reflect requested 'node' attribute in the disco#info reply.

mod_disco: Respond to disco#info to the correct caps hash node ("node#ver").

mod_disco: Cache disco#info reply and caps hash for host, return correct caps hash, and respond to disco#info to the caps hash node.

mod_adhoc: Add capability to pass data to forms

xmpp{client,server}_listener: Convert some calls to tail calls for efficiency

mod_pep: Use util.caps

mod_disco: Support for putting the server's caps hash in stream:features to allow the client to cache disco#info for the server instead of requesting it at each login.

util.caps: Entity capabilities hash generation (moved from mod_pep)

mod_posix: Some (perhaps temporary) changes to re-lock the pidfile after truncating, to avoid breaking prosodyctl

mod_posix: Truncate the pidfile before writing to ensure that we never overwrite with a PID shorter than the previous, and end with an invalid PID in the file.

prosodyctl: Warn and exit if any log files are not writeable, fixes #94

prosodyctl: Force log output always to the console instead of using the config, which avoids creating log files as the wrong user

prosodyctl: Remove warnings when using a non-standard auth provider, prosodyctl now works with any auth provider

mod_auth_internal, usermanager: Rename to mod_auth_internal_plain, and update usermanager to still use it as the default

mod_auth_internal, mod_auth_internal_hashed: Remove checking for nil or empty password and pretending it means the user doesn't exist. Hopefully with more success than Custer.

util-src/Makefile: Stop linking dynamic libraries to Lua, it isn't necessary as symbols are exported from the Lua binary (thanks deryni)

xmppserver_listener: Fix variable names I forgot to change in the last commit

xmpp{client,server}_listener: Put stanzas/in filtering code in the correct place to make it actually work :)

util.filters: Add newline at end of file

MUC: Make number of stored history messages configurable with option max_history_messages (thanks michal and others who requested)

s2smanager: Lower default DNS timeout to 15s (it's now a per-DNS-server timeout, rather than total timeout), use net.dns's new timeout system, and remove our custom timeout handlers

net.dns: Add dns.settimeout() to set the timeout for the default resolver

net.dns: Make timeout configurable (default 15s)

net.dns, net.adns: Update resolver:cancel() API so that a table doesn't need to be created for each cancellation internal to net.dns

net.dns, net.adns: Move coroutine-calling logic into resolver:cancel()

net.dns: Handle our own timeouts, including falling onto other servers in resolv.conf if necessary

mod_roster: Use value returned by pairs() during roster iteration to avoid dozens of wasteful table lookups

mod_bosh: Add jabber:client namespace to stanzas with no namespace

xmppcomponent_listener: Add log messages for when stanzas from components have invalid or missing to/from addresses

xmppcomponent_listener: Import jid_split to fix undefined global reference

mod_component: Read validate_from_addresses option from the config

Merge 0.7->trunk

mod_privacy: Add service discovery feature.

xmppcomponent_listener: Don't validate to/from on non-stanzas, fixes component auth.

xmppcomponent_listener: Validate to/from on components, fixes #104 and #162

Merge 0.7->trunk

mod_privacy: Return the correct item-not-found instead of bad-request when a non-existent list is activated by the client (thanks teo)

Merge 0.7->trunk

net.server_select: Clean up buffer and fire drained callback on successful write before we try and start TLS negotiation (if negotiation fails instantly then we can be left without a handler to use for cleanup) (thanks dersd)

net.server_select: Fix a snippet of code that was living at the wrong indentation level

s2smanager: Don't attempt to connect to a nil host (for whatever reason... invalid DNS record perhaps?) (thanks dersd)

s2smanager: Register outgoing connection with the connection listener only after initializing filters (thanks darkrain, dersd)

util.prosodyctl: Fixed host variables in user_exists.

configure: Add ostype preset for FreeBSD (thanks dersd and tobias (no, the other one))

Merge 0.7->trunk

Merge backout

Backed out changeset 454e1cf18daf (this isn't for debugging, it's to inform the user)

mod_register: Remove the offline store as a list (originally aa3725bbcde5 but missed in a merge)

Merge 0.7->trunk

mod_privacy: Treat stanzas with no 'to' address as going to the user's bare JID (thanks KSid)

util.sasl_cyrus: Return error strings using the new table mapping error codes to strings.

util.sasl_cyrus: Added a table mapping error codes to strings.

mod_register: Delete the offline store as a list, and delete the privacy store.

mod_register: Don't disable account before deleting it (unnecessary, and can cause problems).

mod_compression: Lowered a log level.

util.prosodyctl: Initialize the host's auth provider if necessary (thanks johnny, and all the other people whom this hindered :) )

usermanager: Expose host_handler() as initialize_host()

mod_auth_anonymous, mod_auth_cyrus: Removed unused variables.

mod_auth_anonymous, mod_auth_cyrus: Removed is_admin(), as usermanager already has a default.

mod_pep: Fixed a possible traceback during disco#items queries on a user's bare JID by remote users.

mod_auth_internal_hashed: Update TODO comments to COMPAT

mod_auth_internal_hashed: Remove far too many instances of inline hex conversion using gsub, which was creating useless closures and what-not

mod_auth_internal, mod_auth_internal_hashed: Remove is_admin method from providers

mod_adhoc: Update for new is_admin usage

usermanager: is_admin: Resume the old role of determining precisely whether a user is an admin for a given host (or a global admin) - auth providers checked for JIDs not listed in the config if they support it

util.signal: Moved a variable declaration to the top of a function, for ANSI C compliance.

util.signal: Removed #include <sys/param.h>, as it appears unnecessary.

util.signal: Make kill() available on OS X (thanks darkrain).

MUC: A little modification to improve code analysis.

MUC: Updated room:set_role() to use room:can_set_role().

MUC: Added room:can_set_role().

mod_announce: A little cleanup.

mod_storage: Make DBI a soft dependency, not a hard one.

mod_announce: Removed unused variables.

mod_announce: Changed a global variable to local.

util.signal: Make kill() available on OpenBSD, NetBSD (thanks Florob, filip).

prosody.cfg.lua.dist: Removed commented "defaultauth" from the modules_disabled list.

mod_auth_internal: Log as "auth_internal", not as "usermanager".

mod_auth_cyrus: Log as "auth_cyrus", not as "usermanager".

mod_auth_anonymous: Log as "auth_anonymous", not as "usermanager".

mod_auth_internal_hashed: Log as "auth_internal_hashed", not as "usermanager".

mod_auth_internal_hashed: Don't assume user doesn't exist if no recognizable authentication data is found.

mod_auth_internal_hashed: Removed all checks for Cyrus SASL.

commit d2fb8a5ff43fcf3e94e5e518aba175503590ecda

s2smanager: Fix logging for outgoing sessions to also log pre-filtered data

MUC: Added disco#info features to advertise room's anonymity status (muc_semianonymous or muc_nonanonymous).

MUC: Added disco#info features to advertise room's public status (muc_public or muc_hidden).

MUC: Updated code to use :set_hidden() and :is_hidden().

MUC: Added room:set_hidden(boolean) and room:is_hidden().

MUC: Added disco#info features to advertise room's persistence status (muc_persistent or muc_temporary).

MUC: Replaced direct access of room's internal persistence state with :set_persistent(boolean) and :is_persistent() in various functions.

MUC: Added room:set_persistent(boolean) and room:is_persistent().

MUC: Added disco#info features to advertise room's members-only status (muc_membersonly or muc_open).

MUC: Added a 'Make Room Members-Only?' field to the room config dialog.

MUC: Updated room:get_default_role() to not assign unaffiliated occupants a role in members-only rooms.

MUC: Added room:set_members_only(boolean) and room:is_members_only().

MUC: Added disco#info features to advertise room's moderation status (muc_moderated or muc_unmoderated).

MUC: Added a 'Make Room Moderated?' field to the room config dialog.

MUC: Updated room:get_default_role() to assign unaffiliated occupants a "visitor" role in moderated rooms.

MUC: Added room:set_moderated(boolean) and room:is_moderated().

MUC: Persist data in room:set_password() when called programmatically.

MUC: Added a password field to the room config dialog.

MUC: Include a <password/> element in invites from password protected rooms.

MUC: Added disco#info features to advertise room's password protection (muc_passwordprotected or muc_unsecured, depending on whether a password is set).

MUC: Added password checking on room join.

MUC: Added room:get_password() and room:set_password().

mod_auth_internal_hashed: Fixed a traceback in account creation.

Merge 0.7->trunk

Tagging 0.7.0 (again)

Merge 0.7->trunk

sessionmanager: Fixed a traceback on invalid usernames (typo in previous commit). 0.7.0

mod_saslauth: Return proper error on invalid usernames.

net.server_event: attemp to fix more spelling fail.

sessionmanager: Moved nodeprep to sessionmanager.make_authenticated.

mod_presence: Fixed a traceback on outgoing subscriptions from offline users.

Merge 0.7->trunk

prosodyctl, util.pluginloader: Remove support for storing plugins in the data store, and the addplugin command

mod_uptime: Add ad-hoc command

mod_adhoc: Scan through list of items on load, in case items have been added before we were loaded

mod_adhoc/adhoc.lib: Add copyright header

mod_adhoc/adhoc.lib: Handle errors according to XEP

mod_announce: Add ad-hoc command for sending announcements \o/

Merge 0.7->trunk

mod_compression: Move logging of compression/decompression errors to before the closing of the stream, to make logs a bit easier to follow

Tagging 0.7.0

s2smanager: Move 'sending' debug log message so that it sees the pre-filtered stanzas

mod_compression: Remove the unneccessary stream:reset() overloading, which was causing double decompression and c2s/s2s failures

mod_legacyauth: Fixed the ordering of parameters passed to usermanager.test_password.

mod_privacy: Workaround for a traceback.

mod_adhoc: Imported from prosody-modules, thanks Florob!

mod_auth_internal{,_hashed}: Update is_admin to only report the admin status of the current host (ignores global admin rights), fixes global access traceback

usermanager: Handle checking for global admins on behalf of providers

mod_legacyauth: Use the new usermanager.test_password instead of usermanager.validate_credentials.

mod_auth_internal_hashed: Removed some useless code.

mod_presence: Fixed a traceback.

Merge with Tobias.

mod_auth_internal_hashed: Empty hashpass after conversion to stored_key/server_key and store new authentication database.

mod_auth_internal_hashed: Remove debugging output.

mod_auth_internal_hashed: Convert hashpass to server_key/stored_key on SCRAM-SHA-1 login.

mod_auth_internal_hashed: Convert hashpass to server_key/stored_key on PLAIN login.

Merge with tip.

mod_auth_internal_hashed: Coverting salted password to stored_key and server_key.

mod_auth_internal_hashed: Store stored_key and server_key when setting a password.

util.sasl.scram: Authenticate clients by calculated StoredKey instead of ClientProof.

mod_auth_internal_hashed: Store StoredKey and ServerKey instead of salted hashed password.

Fix missing parameter in mod_auth_internal_hashed.

Merge trunk/MattJ->trunk

mod_presence: Enable firing of pre-events for all outbound stanzas, and switching completely to core_post_stanza.

Merge 0.7->trunk

tools/xep227toprosody.lua: Set executable bit

mod_compression: Removed some useless logging code.

mod_announce: Fixed an edge case where non-admins attempting to announce would get two error replies.

Merge trunk/MattJ->trunk

mod_auth_cyrus: Auth provider with support for Cyrus SASL.

mod_auth_anonymous: Fixed a syntax error.

mod_auth_anonymous: Auth provider with support for SASL ANONYMOUS.

mod_auth_internal_hashed: Added SCRAM-SHA-1 support for SASL.

mod_saslauth: Updated to use usermanager.get_sasl_handler.

mod_auth_internal, mod_auth_internal_hashed: Fixed a global access.

mod_auth_internal, mod_auth_internal_hashed: Updated to provide get_sasl_handler.

usermanager: Changed get_supported_methods to get_sasl_handler.

Merge 0.7->trunk

util.sasl_cyrus: Log the textual representation of unknown Cyrus SASL errors, not just the error code.

util.sasl.scram: Fixed a log level.

mod_presence: Send unavailable presence in response to probes to the sender's full JID, not bare JID.

Merge with trunk.

mod_presence: Enable firing of pre-events for probes.

mod_presence: Don't stop pre-event for outgoing probes.

mod_presence: Small refactoring.

Rename mod_defaultauth -> mod_auth_internal, mod_hashpassauth -> mod_auth_internal_hashed, and the providers to internal and internal_hashed respectively. Also no longer auto-load defaultauth, but instead auto-load the plugin selected for each host at startup based on the provider name.

Merge trunk/MattJ with trunk

util.sasl_cyrus: Log the textual representation of unknown Cyrus SASL errors, not just the error code.

mod_presence: Send unavailable presence in response to probes to the sender's full JID, not bare JID.

SASL: Minor cleanup.

util.sasl.scram: Fixed a log level.

mod_presence: Removed unnecessary parameter 'core_route_stanza' from various functions.

mod_saslauth: Fix log level

usermanager: Rename the fallback provider from 'dummyauth' to 'null'

usermanager: Add hunk that got missed in a merge

util.sasl_cyrus: Log the textual representation of unknown Cyrus SASL errors, not just the error code.

mod_presence: Send unavailable presence in response to probes to the sender's full JID, not bare JID.

SASL: Minor cleanup.

util.sasl.scram: Fixed a log level.

mod_presence: Removed unnecessary parameter 'core_route_stanza' from various functions.

Add jid support for motd

Add motd plugin, giving text to a user on each login.

Add the ability to have names in group files, by putting them with an = sign after the jid:

Correct out of order logic in mod_hashpassauth

Add mechanism for upgrading to hashed passwords from default. Remove some extra debug.

Have defaultauth load by default

Check in mod_hashpassauth -- works!

Working defaultauth

Added mod_auth_default

Update usermanager to not crash, etc.

First bit of work

Merge backout

Backed out changeset 8bd3857a75ee

Merge 0.7->trunk

s2smanager: Remove potentially misleading log message (thanks albert)

Merge 0.7->trunk

net.server_event: Also return the socket from wrapclient, to maintain compatibility with server_select (thanks uhoreg)

mod_compression: Use filters! \o/

xmppserver_listener: Add filters for incoming bytes and stanzas

s2smanager: Add filters for outgoing bytes and stanzas

sessionmanager: Rename filters_initialize->initialize_filters

xmppclient_listener: Add filters for incoming bytes and stanzas

sessionmanager: Initialize new sessions for filtering, and add filters for outgoing bytes and stanzas

util.filters: Ensure initialize() never initializes an object twice - and return the filter function to the caller

xmppserver_listener: Port to util.xmppstream \o/

util.filters: Break processing if a filterer returns nil

util.filters: Don't traceback with no filters of a type added

net.multiplex_listener: Test to make sure listener.onconnect isn't nil.

net.multiplex_listener: Call listener.onconnect(conn) when swapping listeners.

xmppclient_listener: Port to onconnect handler

util.filters: Don't traceback when trying to remove a filter from an uninitialized object

util.filters: Expose the initialization function

util.filters: New utility library for managing filters on an object

mod_pep: Corrected and optimized handling of non-available presence stanzas.

mod_iq: Removed a check for user existance when firing iq/bare/* sub-events.

mod_pep: Use is_contact_subscribed (which uses the new rostermanager fix to avoid unnecessary roster loads)

rostermanager: Optimisation to avoid unnecessarily loading rosters for offline contacts on probes, etc.

Merge compression fix

mod_compression: Update for new session.data() syntax, fixes invalid XML errors after compression negotiation (thanks hg bisect)

Merge 0.7->trunk

mod_groups: Check for existence of roster[false] before clearing version (thanks Flo)

Merge 0.7->trunk

util.sasl.scram: Fix remaining - in profile name

util.sasl.*: Adjusting authentication provider names. All '-' replaced with '_'

Merge trunk/Tobias->trunk

util.sasl.*: Adjusting authentication provider names. All '-' replaced with '_'

Merge 0.7->trunk

util.sasl.scram: Fixing logic error in argument checking.

util.sasl.scram: Fixing logic error in argument checking.

Merge 0.7->trunk

Merge 0.7/waqas->0.7/MattJ

mod_private: Detect datamanager read errors, and respond with 'internal-server-error'.

usermanager: Take datamanager errors into account when determining account existance.

mod_presence: Don't send 'unsubscribed' in response to probes when roster loading fails.

rostermanager: Return an error string when subscription test fails due to an error.

rostermanager: Mark rosters which fail to load as broken, and never save them.

mod_presence: Removed a useless check when handling incoming presence probes and subscriptions.

util.datamanager: Return an error string when failing to save.

util.sasl.scram: Adjusting authentication backend name to conform with the style already used by the plain module.

util.sasl.scram: Fixing issue #177.

util.sasl.plain: Typo.

util.sasl.scram: Providing an API function to generate a salted password for the SCRAM-SHA-1 mechanism.

util.sasl.scram: Split up long line.

util.sasl.scram: Parsing client-final-message in a more strict way. (thanks Marc Santamaria)

util.sasl.scram: Fix in nonce check of client-final-message.

util.sasl.scram: Parsing client-first-message in a more strict way. (thanks Marc Santamaria)

util.sasl.scram: Check nonce in client final message. Check channel binding flag in client first message. Adding some TODOs on more strict parsing. (thanks Marc Santamaria)

util.sasl.scram: Fixed global access.

util.sasl.scram: Adding documentation on SCRAM authentication backend.

util.sasl: Abstracting out the hash function used since SCRAM is independent of it. Adding scram-{mech} authentication backend support.

util.sasl.plain: Removing plain_hashed authentication provider. Just do hashing and comparison yourself in a plain_test authentication provider.

util.sasl: 2009 -> 2010 in copyright header.

util.sasl.plain: Adding plain_hashed authentication backend support.

util.sasl: Moving SASL authentication backends documentation to the mechanism files.

rostermanager: Correctly clear the bare_sessions table on roster load errors during bind.

rostermanager: Don't fire roster-load event if there was an error loading the roster

sessionmanager: Change error for reaching resource limit from 'conflict' to 'resource-constraint' during session bind.

sessionmanager: If roster loading fails during resource bind, kick the user with an internal-server-error.

rostermanager: When loading the roster, also return a datamanager error if available.

util.datamanager: When failing to load a file, and the file exists, return nil, error.

mod_privacy: Improved logging.

mod_presence: Added option 'ignore_presence_priority'.

Merge with backout

Backed out changeset c75c22c316d6 (the XMPP spec now gives a better way to do this)

util.sasl.scram: Fixing issue #177.

util.sasl.plain: Typo.

util.sasl.scram: Providing an API function to generate a salted password for the SCRAM-SHA-1 mechanism.

util.sasl.scram: Split up long line.

util.sasl.scram: Parsing client-final-message in a more strict way. (thanks Marc Santamaria)

util.sasl.scram: Fix in nonce check of client-final-message.

util.sasl.scram: Parsing client-first-message in a more strict way. (thanks Marc Santamaria)

util.sasl.scram: Check nonce in client final message. Check channel binding flag in client first message. Adding some TODOs on more strict parsing. (thanks Marc Santamaria)

util.sasl.plain: Removing plain_hashed authentication provider. Just do hashing and comparison yourself in a plain_test authentication provider.

Merge 0.7->trunk

mod_bosh: Re-layout session object creation to make lines shorter

mod_bosh: Add option consider_bosh_secure to treat BOSH sessions as encrypted even if they don't use HTTP (useful for when secure requests are proxied to Prosody over HTTP)

mod_privacy: Fix several possible tracebacks when either the contact is a host JID, or the contact isn't in your roster and you have roster group/subscription rules in place

mod_privacy: Remove validation that checks a roster group you block actually exists - it would be time-consuming on large rosters, and isn't important (or correct?) anyway.

Merge 0.7->trunk

mod_saslauth: Split out cyrus SASL config options into locals, and add support for cyrus_application_name (default: 'prosody')

Merge 0.7->trunk

usermanager, mod_saslauth: Make account provisioning for Cyrus SASL optional (default: not required)

util.sasl_cyrus: Support for specifying the application name (to pass to Cyrus SASL's init())

mod_saslauth: Add return value and error message to the Cyrus SASL handle_status callback

mod_saslauth: Allow the Cyrus SASL realm to be configurable

Merge 0.7->trunk

net.dns: Remove redundant locals declaration

net.dns: Fix dns.lookup from commit e54774bd73a7

net.dns: Remove redundant locals declaration

net.dns: Fix dns.lookup from commit e54774bd73a7

Merge 0.7->trunk

mod_groups: Remove potentially verbose per-contact logging (thanks Flo)

usermanager: Changed auth provider functions to methods.

Merge 0.7->trunk

Merge 0.6->0.7

configure: Fix to allow option values containing '=' (thanks Jakub)

net/dns: Fix socket.select timeout.

Merge 0.7->trunk

Merge 0.6->0.7

net/httpserver_listener: Ignore empty strings on incoming data.

Merge 0.7->trunk

(0) -3000 -1000 -960 tip

mercurial