Merge 0.7/MattJ with 0.7

Merge with 0.6

mod_bosh: Always give requests a destroy handler, so that the management of each session's request array and the inactive_sessions logic can happen in one place. Simplifies everything and concludes this series of BOSH fixes.

mod_bosh: Fix handling of rids by not dropping requests with repeated rids (assign them their sid instead), and always starting a session with first_rid-1.

mod_bosh: Remove some hacky code for pruning dead requests that hopefully never gets executed - if it does there's a bug anyway.

mod_bosh: Remove requests from the session table using table.remove(), prevents the possibility of holes in the array.

prosodyctl: Support for the new usermanager, refactor host creation and fail if a host is not using the default authentication provider, for now. (thanks Nicola)

usermanager: Export new_default_provider()

usermanager: Handle auth providers for components.

usermanager: Fix logic for per-host admin tables (thanks Maranda)

net.xmppclient_listener: Port to util.xmppstream \o/

prosody: Load util.xmppstream :(

util.xmppstream: Stream objects now just have feed/reset methods

usermanager: Bump log level of incorrect config option warnings

usermanager: Fix for is_admin to work with the new auth provider architecture

Merge 0.7->trunk

Merge 0.6->0.7

mod_console: Set a chunk name for loadstring calls (nicer errors).

mod_posix: Fixed a global access.

mod_console: Ensure that a null byte is printed after sending the banner.

prosody: Modified function metatable for better string representation of functions.

prosody: Lowered log level for a log message.

mod_posix: Don't add a server-starting event handler while the server-starting event is being fired.

net.server_select: Remove some debugging code.

Merge 0.7->trunk

Merge 0.6->0.7

loggingmanager: Enable debug level for default console logging when 'debug' mode is enabled in the config.

loggingmanager: Enable debug level for default console logging when 'debug' mode is enabled in the config.

util.sasl.scram: Fixed global access.

prosodyctl: Use the global events objects for hosts (again) (thanks albert) (sorry albert)

prosodyctl: Give each host an independant events object, because it seems to be the right thing to do

prosodyctl: Relocate global prosody object creation (see fff153f7f4de)

Merge configmanager->trunk

configmanager: Add VirtualHost as an alias for Host (re-applied in trunk due to previous bad merge with 0.7)

Merge 0.7->trunk

mod_console: Make use of the new onconnect callback to initialise session and send banner

net.server_select: Fix typo affecting connections with an onconnect listener that have data pending in the sendbuffer

Merge 0.7->trunk

mod_proxy65: Send error reply to activation stanza if one or both parties were not connected to the proxy

mod_proxy65: Return service-unavailable error when receiving an iq we didn't understand

mod_proxy65: Use new server.link to link proxied connections, now works with either connection backend

net.server_select, net.server_event: Add server.link() to link 2 connections with an intermediate buffer of the specified size

net.server_select, net.server_event: Support for ondrain listener callback for when send buffer is empty

net.server_select, net.server_event: Rename :pattern() method to :set_mode() for select backend, and add :set_mode() to event backend

net.server_select, net.server_event: Support for :pause() and :resume() on connections

usermanager: Give the default auth provider a name, you'll never guess what it is.

Merge Tobias's fancy SASL branch->trunk

Merge with tip.

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

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

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

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

util.sasl.anonymous: Adding documentation on anonymous authentication backend.

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

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

Merge 0.7->trunk

net.server_event: Be sure to fire onincoming for backwards-compatibility with pre-onconnect listeners (thanks darkrain/mod_console)

usermanager: Support for pluggable authentication providers

eventmanager, prosody: Adapt eventmanager to use prosody.events, as a step towards removing it entirely

Merge 0.7->trunk (with MUC needing checking, waqas)

Merge 0.6 into 0.7.

Tagging 0.6.2

prosody.cfg.lua.dist: Refactor the default config file based on feedback from confused users 0.6.2

hostmanager: Re-word log messages in line with config changes

configmanager: Add VirtualHost as an alias for Host

MUC: Allow moderators which are not owners to change roles.

MUC: Include <status code='100'/> in a message, not in presence. Fixes various issues.

modulemanager: Log proper tracebacks on errors during module load/unload.

prosody: Set metatable on functions to allow easy access to upvalues.

configmanager: Fix very wacky indentation

configmanager: Fix some wacky indentation

Merge 0.7->trunk

net.server_event: Call listener.onconnect if it exists, otherwise stick to listener.onincoming

Merge 0.7->trunk

net.server_select: Support for listener.onconnect

Merge 0.7->trunk

Merge 0.6->0.7

net.server: Fix logic error causing traceback when receiving a non-number port

loggingmanager: Fix syntax error :)

Merge 0.7->trunk

util.timer: When using libevent hold onto the event handle to stop it being collected (and the timer stopping). Fixes BOSH ghosts, thanks Flo, niekie, waqas.

loggingmanager: Observe 'debug' config setting for console logging too

Merge 0.7->trunk

Merge 0.6->0.7

Merge 0.6/MattJ -> 0.6

mod_bosh: Default stanza namespace should be jabber:client (fixes BOSH to work with recent namespace fix)

util.ztact: Fixed global accesses.

util.uuid: Use a local instead of a global.

util.stanza: Fixed some more nil global accesses.

util.stanza: Fixed a nil global access.

Merge 0.7->trunk

Merge 0.7/waqas->0.7/MattJ

net.server_event: Fixed spelling fail.

Merge 0.6->0.7

xmppserver_listener: Compatibility fix for older Prosodies with the s2s xmlns bug

stanza_router, s2smanager, modulemanager: Fix for handling of the default namespace on stanzas, causing sometimes jabber:client to be sent over s2s, and accepted

Merge 0.7->trunk

tools/erlparse: Discard erlang PIDs instead of choking on them as a syntax error

tools/erlparse: Report the line number when showing a syntax error in the input file

tools/erlparse: Optimisations aplenty for faster processing of large files

Merge 0.7->trunk

tools/ejabberd2prosody: Create prosody singleton so datamanager can detect the platform (set no platform to use lfs, pposix isn't necessary here)

Merge 0.7->trunk

net.server_event: Don't re-try a write if the connection closed (thanks Flo)

Merge 0.7->trunk

net.server_event: Bump timeout values up somewhat

Merge 0.7->trunk

Merge 0.7/waqas->0.7/MattJ

util.sasl.digest-md5: Removed unnnecessary check (which included a nil global access).

mod_register: Use set_password to set passwords instead of create_user.

usermanager: Added function set_password.

Merge 0.6->0.7

mod_tls: Add s2s_allow_encryption option which, when set to false, disabled TLS for s2s

prosody.cfg.lua.dist: Whitespace fix.

prosody.cfg.lua.dist: Disable mod_privacy by default.

usermanager: Return sane errors/results when Cyrus SASL is in use.

mod_saslauth: Tidier code for SASL backend selection.

mod_saslauth: Fail with an error when the requested SASL backend cannot be used.

Merge 0.7->trunk

Merge 0.6->0.7

util.windows: Convert from Windows line endings

Update copyright headers for 2010

loggingmanager: Don't use non-standard format specifier to format the timestamp.

util.xmppstream: new() now returns a parser object

util.xmppstream: Initial commit

Merge 0.7->trunk

stanza_router: Don't send error replies for stanzas of type 'error' and 'result' on unbound authenticated connections. [originally fa84451e9b35 in 0.6]

stanza_router: Allow non-jabber:client elements after auth, before bind. [originally 2c538d4bde13 in 0.6]

Merge 0.7->trunk

sessionmanager, s2smanager: Add type of ?2s_destroyed to resting sessions (fixes a logging traceback, thanks Flo)

Merge 0.7->trunk

mod_groups: Ignore whitespace on group member JID lines (thanks Luis!)

mod_groups: Fixes to make compatible with roster versioning - set version to 'true' to indicate that the roster is not being versioned

mod_groups: Missed hunk from last commit, don't create the list of public group members unless necessary

mod_groups: Only create group lists when necessary (now we can reliably detect when a user is in /any/ group, including public ones)

rostermanager: Don't bump the roster version if it is == true (ie. we are not versioning the roster)

mod_roster: Tidier code for the roster versioning logic

mod_roster: Tidier code for the roster versioning logic

Merge 0.7->trunk

.hgignore: Ignore prosody.version (thanks Florob)

Merge 0.7->trunk

util.sasl_cyrus: Return invalid-mechanism instead of undefined-condition where appropriate

util.sasl_cyrus: Clarify some log messages and levels

util.sasl_cyrus: Protect the call to cyrussasl.server_new properly.

Merge 0.7->trunk

util.sasl_cyrus: If available, use a c14n callback for interoperability with bad clients.

mod_saslauth: Add a sasl_realm option

util.cyrus_sasl: Pass the realm to Cyrus

Merge darkrain->trunk

util.sasl_cyrus: If available, use a c14n callback for interoperability with bad clients.

mod_saslauth: Add a sasl_realm option

Merge 0.7->trunk

Merge 0.6->0.7

Merge 0.6 with waqas

mod_compression: Improved and lowered log level of some logged messages.

s2smanager: Remove the infamous 'as per RFC' log message entirely (it happens too often to be useful)

Merge with 0.7

Merge with 0.6 (into 0.7, namely mod_compression fixes)

mod_compression: Return <setup-failed/> instead of <unsupported-method/> where applicable.

mod_compression: More robust stanza processing.

mod_compression: Don't succeed after indicating a failure.

mod_compression: Don't tell client compression succeeded when it didn't.

mod_compression: Fixed various possible tracebacks in logging.

util.cyrus_sasl: Pass the realm to Cyrus

MUC: Added support for letting clients manage discussion history.

Merge with 0.7 (and indirectly 0.6.2)

Merge 0.6.2/waqas with 0.6.2/MattJ

Merge 0.6.2/waqas with 0.6.2/MattJ

stanza_router: Don't send error replies for stanzas of type 'error' and 'result' on unbound authenticated connections.

stanza_router: Allow non-jabber:client elements after auth, before bind.

Fixing some typos.

util.sasl.plain: Allow empty authzid (thanks bjc).

mod_tls: Don't offer TLS on hosts that don't have any certs

prosodyctl.man: Update email address

mod_console: Uncomment the help for server:shutdown() - thanks darkrain

ejabberd2prosody: Don't print passwords of imported accounts

ejabberdsql2prosody: Don't print password of imported accounts (thanks azerttyu)

mod_debug: Obsoleted by mod_console

mod_selftests: Obsolete, remove

mod_offline: Remove from 0.7 (offline messages are handled in core at the moment)

MUC: Allow role changes based on JIDs.

mod_presence: Reflect the user's own presence back to them.

configmanager: Remove debugging code accidentally committed

configmanager: Error when a component and host clash hostnames

mod_saslauth: Don't print raw SASL data to avoid logging passwords unnecessarily

prosody: More accurate friendly error message in the event that creating the global SSL context fails

sessionmanager, s2smanager: Fix for syntax of null_data_handler() (thanks Nolan)

sessionmanager, s2smanager: Give sessions dummy data handlers that log when data is received by a destroyed session

net.dns: Normalize records before placing them in the cache, fixes issues with CNAME targets in CAPS (fixes #161)

hostmanager: Log an error if no hosts are defined

mod_tls: Fixed an extra :up() in s2s stream feature generation.

mod_tls: Respond with proper error when TLS cannot be negotiated.

mod_presence: Don't depend on user being online when calculating top resources.

mod_presence: Don't depend on sessions array existing for a user when handling outgoing presence broadcast.

util.encodings: Use STD3 ASCII rules for idna.to_ascii.

prosody: Add a catch-all friendly message for when any port is in use we want to use

util.stanza: stanza.error_reply(): Fix to put the correct namespace on <text>

prosody: Show friendly error when no config present for legacy SSL ports

prosody: Log error message when failing to open ports

MUC: muc.lib.lua: Fix the sending of the occupant JID instead of the nick in role lists and presence broadcasts after role changes (thanks teo)

mod_presence: Quick fix to make probes from local users to local hosts work.

mod_presence: Added handler for presence subscriptions and probes to local hosts.

stanza_router: Added third parameter to core_post_stanza, to control pre-events.

mod_presence: Respond with an unavailable presence when subscribers probe and no resources are available.

prosody: Listen for component connections on port 5347 by default.

mod_component: Fix name of config option in error message (thanks nulani!)

util.dataforms: Add optional type parameters (defaults to 'form')

net.httpserver: More robust handling of headers split across multiple packets

net.httpserver: Make it possible to return responses with no body

net.httpserver: Close connection on invalid HTTP status line

mod_presence: Automatically deny presence requests for hosts, fixes traceback in #153

stanza_router: Log the name of unhandled stanzas (thanks bear)

sessionmanager: Added resource prepping, and invalid resource checking to the bind_resource function.

mod_register: Return a <not-acceptable/> error on empty usernames (thanks Neustradamus).

util.pposix: Fix return type of lc_abort to shush compiler warning

prosody.cfg.lua.dist: Remove lie about requiring console_enabled

modulemanager: Fire item-removed events on module unload.

prosody: Call tostring on the key being used for nil global read before concatenating it with a string.

prosody: Log a warning and traceback, but don't throw an error on nil global read.

Mainfile: Broke up a really long line.

mod_pep: Support item retrieval use cases

mod_pep: Allow storage of urn:xmpp:avatar:data node (payload only with base64 data)

util.stanza: Add stanza:get_child(name, xmlns) to find a child tag given a name/xmlns

tests: Add tests for util.jid.join()

util.jid: Add join(node, host, resource) function to join the components and return nil if invalid

MUC: Only allow moderators to change the room subject.

MUC: Prevent visitors from broadcasting messages.

MUC: Improved handling of incoming groupchat messages (state preserved for possible later use).

core.sessionmanager, net.*_listener: Remove the evil collectgarbage() calls

util.dependencies: Make the commands line up properly in the "missing dependency" output. Yes, this was the commit you didn't know you were waiting for!

mod_bosh: Don't log response XML

s2smanager: Use s2smanager log() if session doesn't have a logger (thanks Flo)

net.httpclient_listener: Don't notify request of closed connection if the close was initiated by us

util.signal: Using stdlib.h instead of malloc.h.

net.http: destroy_request(): Pass request.handler to disconnect() listener to fix small leak

net.http: Close connection when invalid status line is received from the server

net.http: Don't re-destroy a request when the connection is closed

net.http: Port commit 2f235c57d713 to net.http to fix headers in responses (thanks dersd)

README: Update URL for installation docs

HACKERS: Update

TODO: Update for the fact that 0.7 is done

TODO: Update

mod_tls: Set the sslctx on outgoing connections (possibly the cause of outgoing s2s connections not being encrypted)

s2smanager: Fix syntax error)

s2smanager: require_s2s_encryption -> s2s_require_encryption

s2smanager: Make require_s2s_encryption do what it says on the tin

prosodyctl: Fix to load LuaRocks 2.x if we have it

util.dependencies: Load luarocks.loader/luarocks.require

prosodyctl: Use mode r+ for opening the file so 1) it fails if the file doesn't exist 2) we have write access to lock it

mod_posix: Adjust file open mode depending on whether file exists (take that fopen designers!!!)

util.prosodyctl: Report Prosody as not running if the pidfile isn't locked

mod_posix: Lock pidfile when in use, shut down if we can't write or lock the pidfile

util.signal: Restore the old debug hook earlier, just in case we receive another signal between clearing the signal queue and restoring it

util.signal: Update version in header, and author's email

util.signal: Queue up multiple signals, instead of trampling on the previous debug hook (and never clearing our own)

prosody: net_activate_ports: Accept strings as well as numbers for specifying ports

net.dns: Make sure math.randomseed() gets passed an integer

s2smanager: Stamp a 'to' on the reply stream:stream. This makes prosody happy.

prosodyctl: Gracefully handle a missing stty command, and fall back to ANSI escape sequences

mod_httpserver: Rudimentary directory detection, return forbidden instead of causing a traceback (since commit 0325f241a26c)

mod_saslauth: Requiring c2s encryption means requiring c2s encryption... thanks Flo

s2smanager: Give reasons to destroy_session in more cases, including when DNS lookup fails

xmppserver_listener: When a connection fails, pass the reason to destroy_session

s2smanager: Have both destroy_session and bounce_sendq accept a reason string to include in bounced stanzas

s2smanager: Send reply stream header only after checking we serve this host (sorry darkrain... :) )

xmppserver_listener: Make log messages during SRV retries clearer

prosody: Fixed a possible nil concatenation.

net.http: Don't expect the body on redirects

mod_httpserver: Text files are text/plain, and not plain/text.

net.httpserver: Removed mime handling (now in mod_httpserver). Unknown dynamic content is now always served as text/html.

mod_httpserver: Removed a log message.

mod_httpserver: Read files in binary mode; fixes issues with serving binary files.

mod_httpserver: Skip returning a Content-Type when not known (application/octet-stream is not a correct default).

mod_httpserver: Return Content-Type header based on file extension.

util.signal: Make kill() available on Solaris; really fixes #136.

prosody: Less strict matching for the magic 'interrupted' error

componentmanager: Set ssl_ctx[_in] for components correctly, and use global SSL context if available

Disable SSLv2 by default, it's known to be insecure.

net.server_select: Restore checks for wantread/timeout errors on receive

net.server_select: Make bufferlen() method return, of all things, the buffer length

net.server_select: Fix possibility of losing data sent from a socket just before it closes (thanks Sjoerd Simons)

net.dns: Fix for blocking dns lookups to find waiting coroutines correctly (not that we use this in Prosody...)

net.dns: Port some DNS fixes to the resolver:feed() function for net.adns to use

net.httpserver: Quick fix to set the correct Content-Type on simple (string) responses, for a few known types

s2smanager: Don't tostring() the data before sending, sends2s already does this.

net.xmppcomponent_listener: Don't remove 'log' and 'close' from sessions when destroying, and set destroyed = true

net.xmppcomponent_listener: Log invalid XML received from components (as we already do for c2s/s2s)

net.xmppcomponent_listener: Don't allow closing a session that has already been destroyed

net.xmppcomponent_listener: Close component sessions on receiving a </stream:stream>

net.xmppcomponent_listener: Don't handle stream errors from component sessions that have already been destroyed

net.xmppcomponent_listener: Fix to correctly handle stream errors from components

net.xmppclient_listener: Fix to correctly handle stream errors from clients

sessionmanager: Don't re-destroy destroyed sessions

sessionmanager: Return stream error when incoming stream header is missing 'to' attribute

sessionmanager: Add close method to resting sessions

s2smanager: Don't re-destroy destroyed sessions

s2smanager: Add open_stream and close methods to resting sessions

sessionmanager, s2smanager: Close session on </stream:stream>

sessionmanager, s2smanager: Destroyed sessions are now simply resting (not dead) until they are collected - prevents a whole class of tracebacks

net.xmppserver_listener: Clarify log message (for nil/false)

Merge with trunk

mod_offline: Convert to Unix line endings.

Merge with 0.7

net.dns: Trailing whitespace

net.dns: More reliable parsing of resolv.conf - allow multiple nameserver IPs on one line (thanks dersd)

net.server_select: Fix for traceback when a read returns an error and no data (thanks dersd)

certmanager: Friendlier error reporting on OpenWRT and other cases where we don't understand the OpenSSL error

certmanager: Fix nil global access (thanks Marc)

Merge with 0.7

util.sasl: Fixed a nil global access.

util.stanza: Fixed nil global accesses.

certmanager: Fix global access

net.server_select: Fix typo

net.server_event: Fix some global accesses

Merge with 0.7

mod_proxy65: Fix for old-style closing of connections (another source of tracebacks with libevent enabled)

net.server_select: Fix calling method of some handler.close()s

Merge with 0.7

net.server_event: Improve and fix potential traceback in logging of new incoming connections

Merge with 0.7

mod_saslauth: Add FIXME to remind myself to fix this as soon as I have time

Merge with 0.7

Merge with 0.7/waqas

mod_saslauth: Unlock globals while loading cyrus

util.sasl_cyrus: Ensure the mechanisms table is available after a failed auth attempt.

Merge with 0.7

prosody: Bump log message describing current connection backend to level 'info'

Merge with 0.7

prosody.cfg.lua.dist: Fix missing quote in commented proxy config example

Merge with 0.7

Merge with 0.6

tests/test_core_s2smanager.lua: Fix to compare SRV weights correctly

s2smanager: Log and fail gracefully when unable to create socket for outgoing s2s connection (thanks foucault)

s2smanager: Fix for the logic SRV record priority comparison (thanks darkrain)

net.adns: Trailing whitespace

mod_vcard: Stricter matching of vcard stanzas with vcard_compatibility enabled, fixes intercepting stanzas to the full JID that it shouldn't

net.server_event: Add lock_read() method to connections

Merge with 0.7

prosodyctl: Fix addplugin to support --help, and hide from the help listing (for now)

prosodyctl: Fix 'restart' command to not report itself as the 'stop' command (thanks albert!)

Merge with 0.7

prosodyctl.man: Update email address

prosodyctl.man: Include new restart command

Merge with 0.7

mod_console: Uncomment the help for server:shutdown() - thanks darkrain

prosodyctl.man: Update email address

prosodyctl.man: Include new restart command

Merge with 0.7

prosodyctl: Add restart command for KSid and johnny :)

Merge with 0.7

prosody.cfg.lua.dist: Update config for 0.7, most improvements from the Arch Linux package by dbb, thanks!

ejabberd2prosody: Don't print passwords of imported accounts

Merge trunk with trunk

Merge with 0.7.

Merge 0.7 with 0.7 with trunk \o/

Merge 0.7 with 0.7

mod_iq: Fire sub-events for iq/self events.

stanza_router: Make sure /self events are fired when the 'to' attribute is missing.

Merge with 0.7

ejabberdsql2prosody: Don't print password of imported accounts (thanks azerttyu)

Merge with 0.7

mod_debug: Obsoleted by mod_console

mod_selftests: Obsolete, remove

mod_offline: Remove from 0.7 (offline messages are handled in core at the moment)

Backed out changeset e7b09424b486 (not removing mod_offline for trunk)

mod_offline: Remove from 0.7 (offline messages are handled in core at the moment)

mod_storage, plus a bit of SQL and XML.

Merge with 0.7

s2smanager: Use s2smanager log() if session doesn't have a logger (thanks Flo)

net.http: Update print()s to log()s - don't ask how this came to be, I have no idea :)

net.httpclient_listener: Don't notify request of closed connection if the close was initiated by us

net.http: destroy_request(): Remove update for new server API, pass request.handler instead of request.conn to ondisconnect

net.http: Close connection when invalid status line is received from the server

net.http: Don't re-destroy a request when the connection is closed

Merge with 0.7

net.http: Port commit 2f235c57d713 to net.http to fix headers in responses (thanks dersd)

Merge with 0.7

MUC: Allow role changes based on JIDs.

Merge with 0.7

README: Update URL for installation docs

HACKERS: Update

TODO: Update

Merge with 0.7

net.adns: Don't treat locally-initiated disconnects as fatal with libevent backend in use (thanks Flo)

net.server_event: Pass false as connection error to disconnect handler if close was initiated by us

modulemanager: Fix traceback on unloading global modules (thanks KSid)

MUC: Allow role changes based on JIDs.

Merge with 0.7

net.server_event: Increase SSL handshake timeout to 30s, make handshake round-trip count configurable, and bump connect timeout to 20s (thanks Flo)

Merge with 0.7

mod_tls: Only negotiate TLS on outgoing s2s connections if we have an SSL context (thanks Flo...)

Merge with 0.7

net.adns: Fix potential traceback on DNS responses with libevent enabled (thanks Flo)

Makefile: Remove fallbacks/

Makefile: Remove fallbacks/

prosody: Don't add fallbacks to package.path and package.cpath.

util.sasl.scram: Removed unnecessary dependency on bitlib.

mod_saslauth: Log debug message with full error if cyrussasl couldn't be loaded

mod_saslauth: Correct syntax for gracefully handling a missing cyrussasl library

net.server: Remove redundant commented code and some trailing whitespace

mod_presence: Added config option 'bare_message_delivery_policy'. Allowed values are 'priority' (default) and 'broadcast'.

mod_presence: Reflect the user's own presence back to them.

mod_saslauth: Warn and fallback gracefully when Cyrus SASL is requested, but missing.

net.server_event: Fire onincoming() callback for new connections as opposed to the new onconnect() - let's change this for a future version though

configmanager: Remove debugging code accidentally committed

net.server_event: Fix another instance of creating an SSL context - certmanager now does this

net.server_event: Fix traceback in creating SSL context

configmanager: Error when a component and host clash hostnames

mod_tls: Ban TLS after auth, not before.

mod_tls: Fixed traceback during S2S TLS (nil global access).

mod_saslauth: Don't print raw SASL data to avoid logging passwords unnecessarily

prosody: More accurate friendly error message in the event that creating the global SSL context fails

prosody: Use certmanager to create the global SSL context

Merge with 0.7

certmanager: Bring back the friendly errors when failing to load the key/certificate file

componentmanager: Use certmanager for creating contexts

certmanager, hostmanager: Rename get_context() to create_context() to be more explicit about what it does

Merge with backout

Backed out changeset cb1f9266130b: better way to achieve this to be committed Real Soon Now.

mod_tls: Refactor to simplify detection of whether we can do TLS on a connection

stanza_router: Fire /self events for stanzas users send to their own bare JID.

mod_tls: Don't offer TLS on hosts that don't have any certs

sessionmanager, s2smanager: Fix for syntax of null_data_handler() (thanks Nolan)

sessionmanager, s2smanager: Give sessions dummy data handlers that log when data is received by a destroyed session

net.dns: Normalize records before placing them in the cache, fixes issues with CNAME targets in CAPS (fixes #161)

net.dns: Update for new socket API

hostmanager: Small optimisation in checking whether a host is enabled

hostmanager: Log an error if no hosts are defined

mod_privacy: Remove the non-working sendNeededUnavailablePresences() and the related commented code

mod_privacy: Fix to correctly iterate over lists stored in new format

mod_privacy: Upgrade old privacy lists to new storage format, so they don't get lost

s2smanager, mod_compression, mod_tls: Changed event.session to event.origin for s2s-stream-features event for consistency.

mod_saslauth: Hook stream-features event using new events API.

mod_roster: Hook stream-features event using new events API.

mod_legacyauth: Hook stream-features event using new events API.

mod_compression: Hook stream-features event using new events API.

mod_bosh: Fire stream-features event using new events API.

mod_tls: Hook stream-features event using new events API.

sessionmanager: Fire stream-features event using new events API.

mod_tls: Cleanup.

mod_tls: Fixed an extra :up() in s2s stream feature generation.

Merge with trunk.

mod_tls: Remove origin type check when TLS is requested (thanks MattJ).

mod_tls: Respond with proper error when TLS cannot be negotiated.

mod_tls: Inlined some code.

net.server_event: Fixes for traceback with no LuaSec

net.server_select: Small indentation fix

net.server_select: Fix traceback with no LuaSec available (thanks Nolan)

mod_tls: Merged duplicate code.

mod_tls: Switched to new events API.

mod_tls: Slight refactoring.

mod_presence: Don't depend on user being online when calculating top resources.

mod_presence: Don't depend on sessions array existing for a user when handling outgoing presence broadcast.

sessionmanager: Fire resource-unbind event after removing session from sessions table

mod_privacy: Remove use of to identify unspecified privacy list

mod_privacy: Fix potential traceback in stanza validation, and fix some zero-based indexing :)

mod_privacy: Don't store the privacy lists as an array, but as a map... faster and less code

prosody, prosodyctl: Re-jiggle load order again, fixes logging config not being obeyed (thanks darkrain)

loggingmanager: Trailing whitespace

modulemanager: Load plugin libraries in the same environment as the plugins.

modulemanager: Make the plugin environment available directly (module.environment within plugins).

util.datamanager: Added support for hooks to override behavior.

net.server_select: Only allow starttls if luasec is available (thanks Nolan)

net.server_select: *Major* whitespace refactoring to meet Prosody's coding style guidelines, we now have tabs

sessionmanager: Whitespace fix

mod_privacy: Rename from_user/to_user flags to is_from_user/is_to_user for clarity

net.dns, net.adns: Changed dns:socket_wrapper_set to dns.socket_wrapper_set for consistency.

util.sasl_cyrus: Add text message from cyrussasl to <not-authorized/> errors.

mod_tls: Don't advertise TLS after authentication.

net.dns: Fixed whitespace/indentation.

net.dns: Removed unused function.

net.dns: Removed some useless indirection to improve readability.

util.encodings: Use STD3 ASCII rules for idna.to_ascii.

net.httpserver: Make request.conn be the server.lua conn instead of the underlying socket (more useful this way)

net.httpserver: Trailing whitespace

Merge with backout

util.sasl.digest-md5: Revert changeset 6094a4e2b6f3 as it breaks some clients, re-visit some time down the line

prosody: Add a catch-all friendly message for when any port is in use we want to use

prosodyctl: Initialize logging before checking dependencies

prosody: Initialize logging before checking dependencies (fixes another traceback with no LuaSec)

certmanager: Fix traceback with no LuaSec

certmanager: Tabs not spaces!

util.dependencies: Don't query the config (it isn't really necessary)

net.server_event: Update for compatibility with new server API

net.xmppserver_listener: status -> onstatus for consistency

net.server_select: listener.status -> listener.onstatus for consistency

net.adns: Use different flavour of voodoo to make UDP sockets work smoothly with libevent (no packet merging)

util.stanza: stanza.error_reply(): Fix to put the correct namespace on <text>

net.adns: Trailing whitespace

hostmanager: Use certmanager for obtaining SSL contexts

certmanager: Hello world, I'm come to manage your SSL contexts

prosody: Show friendly error when no config present for legacy SSL ports

configmanager: Trailing whitespace

net.connlisteners: Return an error if no SSL context is supplied for a connection of type 'ssl'

prosody: Log error message when failing to open ports

net.server_select: Report whether a new listener uses SSL or not in the log message

prosody: Only set the ssl_ctx for 'ssl' connections

net.connlisteners: Remove redundant variable declaration

net.connlisteners: Update for new server API, type == 'tls' now means little - all connections support TLS

s2smanager: Update for new server SSL API (don't pass a sslctx)

mod_tls: Remove some redundant variable declarations

mod_tls: Set the sslctx on outgoing connections (possibly the cause of outgoing s2s connections not being encrypted)

mod_tls: Update for new server SSL syntax

net.server_select: Remove startssl parameter to the client/server creation functions - passing a sslctx now indicates you want to use SSL from the start

MUC: muc.lib.lua: Fix the sending of the occupant JID instead of the nick in role lists and presence broadcasts after role changes (thanks teo)

s2smanager: Fix syntax error)

s2smanager: require_s2s_encryption -> s2s_require_encryption

s2smanager: Make require_s2s_encryption do what it says on the tin

hostmanager: Trailing whitespace

net.server_event: Trailing whitespace

net.server_event: Support :setlistener() method on connections to work with port multiplexing

Merge with trunk.

mod_presence: Quick fix to make probes from local users to local hosts work.

mod_presence: Added handler for presence subscriptions and probes to local hosts.

stanza_router: Added third parameter to core_post_stanza, to control pre-events.

MUC: Fixes and refactoring for the previous commit to work in all cases, text of error stanzas is now broadcast

MUC: Show error message texts when participants are kicked for stanza errors

MUC: Have get_error_condition() use the new stanza:get_error() (muc.lib.lua 11 lines shorter \o/)

util.stanza: Add stanza:get_error() to return type, condition and text of a stanza error

mod_presence: Respond with an unavailable presence when subscribers probe and no resources are available.

mod_privacy: A handful of logging fixes

mod_privacy: Remove the giant if/end block that was really causing problems - skipping stanzas with no to/from (like presence broadcast). Also optimised the code a *lot*, these changes untested at the moment though.

Merge backed out changeset

Backed out changeset c4240df1b412 (or this)

Backed out changeset a4f9ed3f912e (you didn't see this)

mod_privacy: ...and no 'to' for presence implies an outgoing broadcast

mod_privacy: Mmph, no 'from' == from local

mod_privacy: Fix repeated presence-in (should be presence-out) - this stops the blocking of legitimate inbound presence, and inbound/outbound iqs and messages in Gajim's invisible mode (maybe I can sleep now)

mod_privacy: Trailing whitespace (I can't sleep)

prosodyctl: Don't load luarocks as util.dependencies now does this

prosody: Check dependencies (and load LuaRocks) earlier on in the startup process

util.dependencies: Load luarocks.loader/luarocks.require

mod_console: Update !! shortcut for new connection API

prosodyctl: Don't display message about failing to start Prosody is daemonizing is disabled (if daemonizing is disabled then Prosody is stopped by the time control returns to prosodyctl, which then can't see Prosody running)

util.dependencies, prosody, prosodyctl: Give util.dependencies a check_dependencies() function so the caller can decide what to do when dependencies aren't met - update prosody/prosodyctl for this change

s2smanager: Whitespace

xep227toprosody: Fixed some global accesses.

xep227toprosody: Initial commit (thanks stefan).

xmlhandlers: Removed unused variables.

xmlhandlers: A little optimization.

MUC: Removed old commented code.

MUC: Converted some local functions into methods.

mod_privacy: Removed a useless 'require' within a function.

Merge with trunk.

mod_privacy: Cleaned up code.

mod_privacy: Reduced a function.

mod_privacy: Fixed global access.

prosodyctl: Require util.dependencies to run dependency checks, not only for when starting Prosody directly (thanks Joe)

mod_privacy: Imported from prosody-modules.

mod_component: Cleaned up unused variables.

prosody: Listen for component connections on port 5347 by default.

xmlhandlers: Rearranged a little code.

xmlhandlers: Fixed indentation and added some semicolons.

mod_disco: Added option 'disco_items' to allow appending items to a host's disco#items result.

mod_component: Fix name of config option in error message (thanks nulani!)

xmppcomponent_listener: Update for new connection API

util.dataforms: Add optional type parameters (defaults to 'form')

mod_xmlrpc: Obsolete, remove

mod_bosh: I == fail.

mod_bosh: Simplify cross-domain support, and make it work - default is for cross-domain to be disallowed

mod_bosh: Support for cross-domain access control using CORS

net.httpserver: More robust handling of headers split across multiple packets

util.stanza: Trailing whitespace

net.httpserver: Make it possible to return responses with no body

net.httpserver: Close connection on invalid HTTP status line

modulemanager: Remove obsolete actions code

net.server_{select,event}: Fail gracefully if socket doesn't have a setoption method (LuaSec issue I think)

net.server_event: Replace all calls to _start_ssl() to its bigger brother starttls() - fixes 5223 w/ libevent

objectmanager: Obsolete, remove

actions: Obsolete, remove

mod_actions_http: Obsolete, remove

mod_bosh: Trailing whitespace

s2smanager: Log error and fail gracefully if we can't open a socket for an outgoing s2s connection (thanks foucault)

net.xmppserver_listener: Handle stream-error errors from xmlhandlers, and close session in response

net.xmppserver_listener: Extend session:close() with a remote_reason parameter

s2smanager: No-one noticed that Prosody stopped sending to/from on stream headers recently? :)

xmlhandlers: Move stream-error detection to somewhere more appropriate (it was never reached) - s2s stream errors now reported properly

mod_bosh: Update for new xmlhandlers syntax

net.xmpp{client,server,component}: Update for new xmlhandlers syntax

net.xmppserver_listener: Pass reason for session disconnection to disconnect handler, if known

xmlhandlers: More refactoring, split up stream_ns and stream_tag, add stream_error_tag so that callers don't need to be so worried about the separator we use

xmlhandlers: Define ns_separator and ns_pattern to save repeating it in literal form throughout the file

net.server_event: Remove access to starttls method when starttls is negotiated - fixes offering starttls to client who are already using it (thanks darkrain and Adium)

mod_presence: Automatically deny presence requests for hosts, fixes traceback in #153

stanza_router: Log the name of unhandled stanzas (thanks bear)

util.signal: Using stdlib.h instead of malloc.h.

mod_muc: Remove unused history_length declaration

prosodyctl: Use mode r+ for opening the file so 1) it fails if the file doesn't exist 2) we have write access to lock it

mod_posix: Adjust file open mode depending on whether file exists (take that fopen designers!!!)

util.pposix, mod_posix, prosodyctl: Bump pposix version to 0.3.3 for mkdir

xmppclient_listener: Allow the tcp_keepalives option in the config to control whether keepalives are used

net.server_event: Add conn:setoption() to set options on the socket

net.server_select: Add conn:setoption() to set options on the socket

mod_saslauth: Fixed some indentation and added some semi-colons.

mod_saslauth: Made some variables local to avoid unnecessary global access.

sessionmanager: Added resource prepping, and invalid resource checking to the bind_resource function.

mod_register: Return a <not-acceptable/> error on empty usernames (thanks Neustradamus).

componentmanager: Add dialback_secret to components to allow s2s to work (thanks Flo)

util.prosodyctl: Report Prosody as not running if the pidfile isn't locked

mod_posix: Lock pidfile when in use, shut down if we can't write or lock the pidfile

util.datamanager: Use pposix.mkdir if available

util.pposix: Add mkdir(path)

prosodyctl: Move definition of prosody singleton to prior to loading datamanager, and add platform

util.pposix: Replace the unwieldy module table generation with luaL_register() call - side effect - it now sets the pposix global to the module table

mod_posix: Set umask to 'umask' from the config, or 027

prosodyctl: Set umask to protect data files, bump pposix dep to 0.3.2

util.pposix: Add pposix.umask(), bump version to 0.3.2 (and do the same in mod_posix)

util.pposix: Fix return type of lc_abort to shush compiler warning

util.posix: Trailing whitespace

net.server: When libevent backend is in use, override signal.signal to use server.hook_signal

net.server_event: Add server.hook_signal(signal_num, handler) to wrap libevent's signal-catching interface

mod_posix: Remove the lines added to work around the util.signal loop bug

util.signal: Restore the old debug hook earlier, just in case we receive another signal between clearing the signal queue and restoring it

util.signal: Update version in header, and author's email

util.signal: Queue up multiple signals, instead of trampling on the previous debug hook (and never clearing our own)

prosody: net_activate_ports: Accept strings as well as numbers for specifying ports

prosody: Read list of possible config extensions from configmanager, removes old TODO

configmanager: Add parsers() method to return an array of supported config formats

s2smanager: Split sending of stream header into a :open_stream() method

net.dns: Make sure math.randomseed() gets passed an integer

net.server_select: Fix oops in last commit

net.server_select: Allow setting the logger using server.setlogger

s2smanager: Allow new_outgoing() to create sessions without automatically connecting them (set 3rd parameters to false)

s2smanager: Stamp a 'to' on the reply stream:stream. This makes prosody happy.

s2smanager, hostmanager: Make dialback secrets per-host

s2smanager: Trim trailing whitespace

mod_saslauth: Oops.

Merge with Paul

mod_muc/muc.lib: Use stanza:get_child() to locate MUC child element

mod_saslauth: Use module:get_option()

mod_saslauth: Add sasl_backend config parameter

Merge with Rob

Added notification of configuration changes for MUCs

Add support for non-anonymous MUC rooms

prosodyctl: Gracefully handle a missing stty command, and fall back to ANSI escape sequences

mod_httpserver: Rudimentary directory detection, return forbidden instead of causing a traceback (since commit 0325f241a26c)

prosody.cfg.lua.dist: Remove lie about requiring console_enabled

prosody.cfg.lua.dist: Remove trailing whitespace

util.events: Rename add_plugin() and remove_plugin() to add_handlers() and remove_handlers() respectively

util.signal: Update header comment for new filename

util.sasl_cyrus: Report an error if Cyrus SASL init fails.

util.sasl_cyrus: Removing whitespace.

util.sasl_cyrus: Automatically initialize Cyrus SASL with the first used service name.

util.sasl_cyrus: Change variable name.

util.sasl_cyrus: Fixing cyrus mechanism list parsing. (Thanks darkrain)

net.httpserver: Optimized response serialization.

mod_saslauth: Adjust sanitizing.

mod_saslauth: Sanitize debugging information so it won't break terminal emulation when using GSSAPI auth.

first working version with Cyrus SASL support.

added comment to remind us to fix binary output breaking the terminal

util.sasl_cyrus: Further fixing and cleanup.

util.sasl_cyrus: Initializing Cyrus SASL library and a bit cleanup.

util.sasl_cyrus: Log errors if CyrusSASL init fails.

mod_saslauth: Make service_name configurable for CyrusSASL users.

mod_saslauth: Add support for CyrusSASL.

Adding sasl_cyrus.lua. A sasl.lua drop-in replacement to use CyrusSASL for all c2s authentication.

mod_saslauth: Requiring c2s encryption means requiring c2s encryption... thanks Flo

net.dns: Update synchronous path for new connection API

util.prosodyctl: Saner determination of Prosody executable path

mod_pep: Added a TODO.

mod_pep: Handle service discovery queries for bare account JIDs (thanks darkrain).

mod_disco: Handle and fire events for service discovery queries for bare account JIDs (thanks darkrain).

s2smanager: Give reasons to destroy_session in more cases, including when DNS lookup fails

Merge with backout branch

s2smanager: Send reply stream header only after checking we serve this host (sorry darkrain... :) )

Backed out changeset 78c5cb163ea9, to fix another way. Haven't done this for a while :)

s2smanager: More whitespace

s2smanager: Mark stream as opened sooner, this prevents a duplicated stream header on host-unknown errors (thanks darkrain and his mail server)

s2smanager: Whitespace

net.server_event: Add properties like _ip and _port to server objects too

net.server_event: Add :serverport() method to be compatible with old API

mod_bosh: Update for new connection API

httpserver_listener: Update for new connection API

net.httpserver: Fix usage of old connection API syntax

xmppserver_listener: Make log messages during SRV retries clearer

xmppserver_listener: When a connection fails, pass the reason to destroy_session

s2smanager: Have both destroy_session and bounce_sendq accept a reason string to include in bounced stanzas

net.server_event: Load ssl/socket libraries if not already available

util.timer: Use luaevent's built-in method of repeating an event (fixes a weird crash)

prosody: Fixed a possible nil concatenation.

prosody: Fix to net_activate_ports to mend binding to specific interfaces

net.http: Don't expect the body on redirects

prosody: Added config option 'ssl_ports' to allow multiplexed SSL ports.

mod_httpserver: Text files are text/plain, and not plain/text.

net.httpserver: Removed mime handling (now in mod_httpserver). Unknown dynamic content is now always served as text/html.

mod_httpserver: Removed a log message.

mod_httpserver: Read files in binary mode; fixes issues with serving binary files.

mod_httpserver: Skip returning a Content-Type when not known (application/octet-stream is not a correct default).

mod_httpserver: Return Content-Type header based on file extension.

mod_httpserver: Delay setup until after server is started.

mod_bosh: Delay setup until after server is started.

prosody: Use the multiplex listener when the 'ports' config option is specified.

net_activate_ports: Use the default config option 'ports' when no option is specified.

multiplex_listener: Initial commit. Multiple protocols on a single port.

modulemanager: Fire item-removed events on module unload.

modulemanager: Fixed a global access.

prosody: Call tostring on the key being used for nil global read before concatenating it with a string.

prosody: Log a warning and traceback, but don't throw an error on nil global read.

Mainfile: Broke up a really long line.

Merge with 0.6

mod_vcard: Stricter matching of vcard stanzas with vcard_compatibility enabled, fixes intercepting stanzas to the full JID that it shouldn't

util.signal: Make kill() available on Solaris; really fixes #136.

mod_posix: Fix to not loop in SIGTERM either, but the same happens with SIGHUP (where the same 'fix' can't be applied) - shall investigate tomorrow

prosody: Report the current socket backend in use

net.server_event: Add get_backend() method

net.server_select: Add get_backend() method

mod_posix: Set empty SIGINT handler when a SIGINT is caught

prosody: Clarify and add some comments to describe what we're doing when and why

Rename closeallservers to closeall in the public API (same as net.server_select) and expose setquitting

net.server_event: Add setquitting() function to be compatible with net.server_select

net.server_event: Fix closeallservers() to work correctly after the giant refactorizification

net.server_event: Return "quitting" on loop exit to be compatible with net.server_select, and give Prosody a way to know why the loop broke

mod_posix: Catch SIGINT

Merge with trunk

prosody: Less strict matching for the magic 'interrupted' error

mod_pep: Support item retrieval use cases

mod_pep: Allow storage of urn:xmpp:avatar:data node (payload only with base64 data)

prosodyctl: Nicer errors when addplugin command fails

util.datamanager: Store data stores with no host in '_global' folder

util.pluginloader: Don't specify a host for the plugin data store (clever waqas...)

mod_compression: Tweak some log levels

componentmanager: Set ssl_ctx[_in] for components correctly, and use global SSL context if available

prosody: Expose global_ssl_ctx through prosody object

Disable SSLv2 by default, it's known to be insecure.

mod_proxy65: Strip trailing whitespace

util-src/Makefile: Clean up makefile (re-commit because MattJ shouldn't commit anything at 3AM)

net.server_select, net.server_event: Convert to unix line endings from Windows

util-src/Makefile: Clean up makefile, rename lsignal.c to signal.c

configure: fix typo of 'yes' -> 'yet'

configure: Add 'linux' ostype and rename lflags to LDFLAGS to match expectations.

Redo merge with Waqas' PBKDF2 optimizations.

Merge with Waqas.

net.server_select: Restore checks for wantread/timeout errors on receive

mod_proxy65: Don't read data from the connection untill the proxying is activated

mod_proxy65: Make the proxying bidirectional

mod_proxy65: Use a bigger buffer for data we're proxying

mod_proxy65: Only lock the reading side when throttling

net.server_select: Add a function to just lock a stream for reading

mod_proxy65: Throttle connections to prevent senders flooding the server's buffers if the receiver doesn't receive fast enough

mod_proxy65: Replace error() calls with module:log("error", ...)

net.server_select: Make bufferlen() method return, of all things, the buffer length

net.server_event: Port fix in 2dc9bbf25447 to libevent-based backend

net.server_select: Fix possibility of losing data sent from a socket just before it closes (thanks Sjoerd Simons)

net.dns: Fix for blocking dns lookups to find waiting coroutines correctly (not that we use this in Prosody...)

net.dns: Port some DNS fixes to the resolver:feed() function for net.adns to use

Merge with 0.6

util.dependencies: Fix package name of LuaFilesystem

Merge with Tobias

mod_console: Show compression status on s2s:show() output.

Merge with tip.

Merge with Tobias

modulemanager, net.dns: Remove trailing whitespace

prosodyctl: Experimental 'addplugin' command

mod_compression: Removing trailing whitespace.

mod_compression: Declaring the de-/compression pipes as local.

mod_compression: Some comment clean up.

Merge with tip.

mod_compression: Removing forgotten debugging output.

mod_compression: Define db (dialback) namespace in stream header.

Merge with tip.

mod_compression: Enabeling compression for outgoing s2s streams.

mod_compression: Some further refactoring.

mod_compression: Make setup_compression work for s2s sessions too.

mod_compression: Moving compression setup in a dedicated function.

mod_compression: Prepare activating of compression on s2s.

Merge with tip.

Enable one way stream compression on s2s links.

Fixing some typos.

util.pluginloader: Support for fetching plugins from the data store

net.httpserver: Fix to work with new server API

net.httpserver: Quick fix to set the correct Content-Type on simple (string) responses, for a few known types

mod_proxy65: Remove trailing whitespace

mod_proxy65: Fix log:module -> module:log :)

Merge with trunk

util.sasl.plain: Allow empty authzid (thanks bjc).

util.hmac: Optimized.

util.sasl.scram: Optimized binaryXOR.

util.sasl.scram: Fixed a variable redeclaration.

modulemanager: Fire events module-loaded and module-unloaded, both receive a table with 'module' and 'host' fields, thanks bjc

util.sasl.scram: Making =2D and =3D substitution actually work.

util.stanza: Add stanza:get_child(name, xmlns) to find a child tag given a name/xmlns

util.sasl.plain: A little refactoring.

Merge with 0.6.

core.xmlhandlers: Fixed processing of empty namespaces (which caused an issue with jwchat).

mod_register: Properly notify contacts of subscription removal on account deletion.

mod_presence: Use the local host object as the origin for auto-generated subscription approvals and cancellations.

util.sasl.digest-md5: Fixing some variable access.

Merge with Tobias

xmppserver_listener: Update for new server API, fixes traceback when closing s2s connections

Make some more variables to locals.

util.sasl: Move some variables to local space. Fix a bug.

mod_console: Update for new server API, fixes traceback when closing console sessions

util.sasl.plain: Fail gracefully on empty <auth/> tag

mod_saslauth: Fix typo in variable name

net.server_select: Update conn.close() to use new connection method convention

mod_proxy65: Use new jid.join() from util.jid

tests/test.lua: Changes to environment handling of tests, and replace module() with dummy function that doesn't alter the current environment

tests: Add tests for util.jid.join()

tests/test.lua: Print the current test being run if verbosity sufficient

util.jid: Add join(node, host, resource) function to join the components and return nil if invalid

mod_proxy65: Update listener callback names for new server API

Merged with tip.

mod_saslauth: Allow relogins after failed SASL login.

util.sasl: Adding clean_clone() method.

net.server_event: Add addclient/wrapclient compatible with server_select, DNS and s2s should now work with libevent \o/

net.server_event: tostring() some debug logging parameters

net.server_event: Add set_send() for compatibility with server_select

net.server_event: Hide starttls function when the connection is not SSL-enabled

net.server_event: Count the number of client connections *upwards* :)

net.server_handler: Add stub handlers as fallbacks for those listeners don't implement

net.server_event: Fix to make ontimeout() listener callback work

net.server_select: Rename server.setsend() to server.set_send() for consistency

net.adns: Some cleanup, happens to also make it compatible with libevent

s2smanager: Allow configuration of the dialback_secret in the config

Merge with 0.6.

mod_presence: Use the local host as origin for subscription request acks.

mod_presence: Removed an unnecessary compatibility workaround which was causing issues with unavailable presence exchange after subscription removal.

mod_roster: Ask remote server to remove pending subscription requests when removing roster items.

Tagging 0.6.1

Tagging 0.6.0

Makefile: Fix to install new util/sasl directory

Merge with 0.6

util.serialization: Correctly serialize tables with 'false' as a key, fixes an issue with rosters not saving (thanks mathias, Tobias) 0.6.1

Merge with trunk

Merge with trunk.

MUC: Added support for the room-destroy owner use case.

MUC: Slightly refactored form processing.

Merge with 0.6

util.dataforms: Don't require type when parsing form XML

SASL: Using locally mapped s_gmatch instead of unavailable gmatch.

Merge with trunk

MUC: Only allow moderators to change the room subject.

MUC: Prevent visitors from broadcasting messages.

MUC: Improved handling of incoming groupchat messages (state preserved for possible later use).

Removed some legacy doc/ files.

Merge with Tobias's SASL redesign branch

Merge with trunk.

Reduce needed roundtrips during DIGEST-MD5 login.

Adding some human readable error messages.

Fail if username or password don't pass SASLprep.

Use new cofig option reading API.

Allow SASL PLAIN over unsecure connections when intended by admin.

Typo.

Handle , and = in usernames for SCRAM.

Provide SASL PLAIN mechanism only if TLS is active.

Cleaning up.

Tidying up.

Enable restriction of supported mechanisms in the SASL library.

SASLprep authentication and password in SASL PLAIN implementation.

SASLprep usernames and passwords.

Making interop with libpurple. (Thanks darkrain).

Add check for forbidden char sequences in validate_username().

Completed SCRAM-SHA-1 implementation to a ready-to-test state.

Added missing require for generate_uuid.

Initial commit of SCRAM SASL mechanism.

Merge with sasl branch.

Adding a note for possible round trip savings. sasl

Adding support for digest-md5 profile in DIGEST-MD5 implementation. sasl

Change of the digest-md5 profile. sasl

Broken DIGEST-MD5 client support again. sasl

Add support for plain profile in digest-md5 implementation. sasl

Getting PLAIN mechanism work with the new API. sasl

Move each mechanism in an own file. sasl

Fail if mechanism has already been selected. sasl

Store stage in SASL object. sasl

Importing SASL Digest-MD5 code. Now for real. sasl

Importing SASL Digest-MD5 code. sasl

List RFC numbers. sasl

Allow ampersands in passwords for SASL PLAIN mechanism. sasl

Making mod_saslauth use the new SASL API. sasl

Adjust SASL PLAIN mechanism to the new API. sasl

Adding some docu. sasl

Mostly making the code run; includes fixing typos and so on. sasl

Initial commit of the SASL redesign. sasl

Merge with 0.6

util.dependencies: Log an error if the current version of LuaSec installed contains The Bug (thanks Remko)

Merge with 0.6 on prosody.im 0.6.0

xmppclient_listener: Escape control characters when logging invalid XML.

Merge with 0.6

s2smanager: Log warning when trying to send a stanza from a host we don't serve, instead of a traceback (thanks stpeter)

Merge with trunk

net.server: Log an error when libevent is requested, but luaevent is unavailable, and don't load luaevent when not requested.

core.sessionmanager, net.*_listener: Remove the evil collectgarbage() calls

Merge with trunk

Merged with 0.6.

prosody: Added support for command line argument '--config'.

Merge with 0.6

util.datamanager: Replace popen(mkdir) with lfs.mkdir, keeping the just-in-time creation until we have the new datamanager API

util.dependencies: Missed a Debian/

util.dependencies: Clearer message, add homepages, etc.

util.dependencies: Add LuaFileSystem as a hard dependency

Merge with trunk

Merged with 0.6.

util.serialization: Replaced commas with semi-colons between table fields.

util.serialization: Concise output for empty tables.

Mainfile: Fixed some comments.

tests/modulemanager_option_conversion.lua: Add standalone test script for the new modulemanager config option API

modulemanager: New module API methods for getting config options with type conversion, get_option_string, get_option_number, get_option_boolean, get_option_array, get_option_set

util.dependencies: Make the commands line up properly in the "missing dependency" output. Yes, this was the commit you didn't know you were waiting for!

mod_console: Update for new net.server API

Merged with 0.6.

mod_presence: Route incoming presence subscription stanzas (types unsubscribe, subscribed and unsubscribed) to the user before roster pushes.

mod_presence: Acknowledge subscription requests by responding with an unavailable presence.

sessionmanager: Added function send_to_interested_resources().

sessionmanager: Fixed and cleaned function send_to_available_resources(). The 'to' attribute for presence subscription stanzas is now preserved.

loggingmanager: Explicitly flush log messages if the __FLUSH_LOG environment variable is defined (workaround for MSVCRT buffering piped output).

mod_proxy65: Update for new net.server API, untested

mod_proxy65: Import from prosody-modules, thanks Ephraim :)

net.server: Add some comments to explain to waqas how it all works :)

xmppcomponent_listener: Use new API for writing to components, fixes traceback (thanks Tobias)

s2smanager: Fix syntax error introduced in merge

Merge with trunk

stanza_router: Don't log full stanzas destined for s2s

objectmanager: Convert to unix line-endings

s2smanager: Don't log full stanza when sending outwards

s2smanager: Don't tostring() the data before sending, sends2s already does this.

net.server_select: Bring up to date to new common connection API

net.httpserver, net.http: Update for new net.server API (untested)

*_listener: Update for new net.server API, specifically .listener -> .onincoming, .disconnect -> .ondisconnect

net.adns: Update for new net.server API (doesn't work with libevent yet)

s2smanager: Update for new net.server API (s2s still doesn't work with libevent for other reasons)

net.server_event: Comment accidentally uncommented vdebug()

net.server_event: Handle and ignore 'wantread' error from receive(), treat as a timeout

net.server_event: Remove premature non-optimisation

net.server_event: Fix moved line caused by Mercurial's crecord and my selective commits

net.server_event: Obey nowriting/nointerface for locks in interface methods

net.server_event: Use conn property for send/receive instead of caching, fixes trying to use original socket after SSL-wrapping

net.server_event: Set startsslcallback property to nil when we're done handshaking, otherwise we keep trying to repeat the handshake

net.server_event: Add set_sslctx() method to connections

net.server_event: conn.usingssl -> conn._usingssl

net.server_event: Use correct listener callbacks

net.server_event: Small whitespace fixes

net.server_event: Correct a few instances of .sslctx to ._sslctx

net.server_event: Call connection's onconnect, no need to pass closures around now

net.server_event: Use connection id in all relevant logging

net.server_event: Define id property for connection objects, to aid logging

net.server_event: Define vdebug function for convenience

net.server_event: Change to new standard addserver() syntax

net.server_select: Change addserver() parameters to be compatible with new standard syntax

mod_tls: Switch to : syntax for connection methods

xmppclient_listener: Use : syntax for connection methods, to be compatible with new server.lua

xmppclient_listener: Switch to .onincoming listener method, to be compatible with new server_event.lua

net.server: Small fix for addtimer() compatibility code

net.connlisteners: Standardise on new syntax for addserver(), and clean up a bit

sessionmanager: Use : syntax for calling connection methods

mod_bosh: Don't log response XML

util.timer: Fix libevent timers (event.base doesn't exist...)

net.server_event: Export base as event_base

net.server_event: Comment overly verbose log message

util.timer: Use libevent for lightweight timers if available and configured (use_libevent option)

net.server: New net.server to choose the appropriate library from server_select/server_event based on the availability of luaevent and the use_libevent config option

net.server: Rename to net.server_select

net.server_event: Remove redundant getid() function

net.server_event: Initial commit of server_event.lua. Don't get too excited, it's not used at all yet, and is still incomplete :)

s2smanager: Fail outgoing s2s connection if hostname does not pass idna_to_ascii(), thanks Flo + waqas

s2smanager: Queue db:verify unless we already sent a db:result (if we had then it can could a dialback deadlock). Also remove some redundant code which could cause a db:result to be sent while still negotiating features (e.g. TLS) and break things. Collectively these fix a 'random' s2s failure (usually with ejabberd for some reason) - resulting in an 'unbound prefix' XML error, or 'ssl handshake failure'. Was this commit message long enough? I think so.

util.sasl: Add COMPAT comment

mod_console: Moved activation of the console port from the main file to mod_console.

prosody.net_activate_ports: Slightly refactored and definition moved to before modules are loaded.

mod_register: Log a debug message when a session's IP is not available.

(0) -3000 -1000 -960 +960 tip

mercurial