Update Makefile to set correct paths on install with Debian package

Add some example certificates and update the config to point to them

Add COPYING, remove LICENSE

Merfe from Tobias

Apply IDNA to ASCII on hostnames.

Forced merge.

Use unsigned int instead of uint because uint is already in use on OS X.

To use free you should include stdlib.h rather than malloc.h according to man page of free() and various C reference websites.

Do idna_to_ascii when building own response.

Fix for loading connlisteners when running without CFG_SOURCEDIR

Also look for binary modules in the parent directory when running tests

Automated merge with http://waqas.ath.cx/

Moved incoming c2s presence handling from stanza_router to presencemanager

Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.

Fix for configmanager when config file can't be found

Rename and update config. Update Makefile for this change.

More Makefile improvements

Add a top-level Makefile and ./configure script. Update util-src Makefile for this.

Removing pull_from_master.sh. Use hg fetch instead.

Load prosody instead of main.lia in mod_console

Make prosody executable

Automated merge with http://waqas.ath.cx/

Added a FIXME

Improved the regexp used to parse the client response a bit. Authenticating with non-ascii realm values now works.

Fixed logging in datamanager

main.lua -> prosody

Merge from waqas

Quickfix for dns.lua to not crash on failed connection to name servers

Added option core.data_path

No more reading 1 byte at a time from sockets

Merge from waqas

Completely switched to new hashes library from the old md5 library

Switched from md5 to sha256 for dialback key generation

Stopped using the lbase64 library

Added make.bat for windows

Removed MS specific preprocessor statements from the Makefile

Add module:unload() to mod_console, and allow module:load() to take config param

Merge from waqas

Makefile now works on windows with Microsoft's compiler

Minor changes to C files (to prevent compiler warnings)

Some mod_console updates

is_loaded() and incomplete unload() for modules

Bumper commit for the new modulemanager API \o/ Updates all the modules, though some more changes may be in store.

Nice enhancement for logging output

Removing servermanager... it is no longer used

Log reason for connection failure

(Basic) IDNA and SRV fallback support

Fix to make a global configmanager instance

Fix for hashes.c and encodings.c to rename luaopen for util_*

Fix a waqas copy/paste error. It was my fault again apparently.

Merge from waqas

Added options to limit the number of resources and for handling of resource conflicts

Update mod_selftests to use the hosts on http://xmpp.org/interop/servers.shtml

Yes, we don't put these things in here, we put them in here.

Wrapped a core_process_stanza call in an xpcall call

Added mod_ping with support for [XEP-0199: XMPP Ping]

Changed format for XEP-0090 to the legacy format

Added mod_time with support for [XEP-0202: Entity Time] and [XEP-0090: Entity Time] (deprecated)

Merge from waqas

Modules now sending disco replies

Minor bug fix

Added helper method to discomanager

Add rough Makefile for util-src/

Removed commented code

Added util-src/hashes.c - support for sha1, sha256 and md5 hashes

Added util-src/encodings.c - support for base64, stringprep and idna encodings

Update TODO

Refuse to run without SSL/TLS unless run_without_ssl is set in config

Change loading order of modules, config before dependency checking

Some mod_console changes

Trivial whitespace fix in the missing dependency message

Add MD5 to the list of checked dependencies

Friendlier messages on missing dependencies

Fix softreq, so it reports when no suitable MD5 library is found

SSL library is optional, not a fatal error

Some ends too much.

Some changes to report more correct SASL failures. Support for disabled accounts.

Merging with main branch.

Checking some variables for nil so no errors occur that'll break the server.

Removing some debug messages.

Merge from waqas

Added temporary fix for srv on windows: using opendns nameservers

Check to prevent error on IQs from completely unhandled origins

Backed out the backout. Now we're back out.

Reverted my change to modulemanager, to restore those made by waqas

Backed out changeset 79bd7a3e906c

Merge from waqas

Ahem, a bit of an identity crisis..

Removing lxmppd.cfg.dist

Typo prevented modulemanager.load() from returning the error if load failed.

Merge from waqas

Added mod_disco

Added discomanager

Added discohelper

Account deletion support

Check to prevent error for IQs from completely unhandled origins

Removed useless check

Only start console if it is enabled in the config. Note that the exact option is going to change tomorrow.

Add initial mod_console

Comment out remote debug, will later be enabled via config

Small fix for connlisteners to accept nil for userdata

Fix various mistakes in dns.lua

Fix dns for poor Windows users, who have never seen a resolv.conf

Add new lxmppd.cfg.lua.dist example config file

New configmanager. Old-style config files still work, but will print a warning

Fix mod_selftests syntax, and switch it to use config

All the people who don't use TLS, this one's for you.

Add helper function for adding message bodies to stanzas

Now possible to specify nil origin to core_route_stanza. Origin will be chosen as the host of the 'from' attribute on the stanza. Returns false on no such host.

Import initial configmanager, not sure if it works yet, but it does pass the unit tests ;)

Update test.lua with a work-in-progress

Better names for variables

Remove old TODO

Remove some declarations I added while debugging

Improve jid.split() and jid.bare() to pass new test cases with invalid JIDs

Add jid.bare() helper function

Adding selftests module, but not enabling in config

Oops, never added the tests for s2smanager to the repo

Add run_tests.sh

Update unit testing to output coverage reports

Remove or comment useless prints, or change them to log()

Add event for server startup completed: server-started

Don't error reply to stanzas direct over the s2s stream they came from

Use a stanza for c2s stream features instead of an array of strings. Removes a FIXME.

Log number of open sessions on session creation

Remove a debug print() from xmlhandlers

Remove version=1.0 on s2s stream headers, again.

Remove an old FIXME comment

Fix the reversed to/from on the final db:result. Fixes M-Link and Gmail. Thanks dwd!!

Comments and logging fixes

Send version=1.0 again in s2s stream header

Fix for setting the correct host on the socket, seems to fix s2s with XCP

Show which session got disconnected in log message

Don't error if the original s2s connection has closed before we get the dialback result

Don't send version 1.0. Who cares about Gmail?

Send version=1.0 in s2s stream header. Send s2s stream:features when in 1.0 mode.

Don't attempt to auth connection unless stanzas are being sent across it

Log sent s2s stanzas

Incorrect function set as callback

Don't error if streamopened/streamclosed callback is not specified for a session

Extra checks before sending error replies to incoming stanzas

Fix sending of unavailable presence on disconnect

Don't forget to escape XML in attributes. Thanks to the Postgres Q&A room on conference.jabber.org :)

We have SRV resolving \o/

Small fix for servermanager

Fix to prevent send retry when connection is already closed

*ahem* Yes, move along please... though really, quite a classic. :)

session:disconnect() -> session:close() for consistency with other Lua APIs

Remove useless check for unavailable presence (which never exists)

Quite some changes, to:

s2s sessions can now be disconnected, with or without a stream error. Fixes #8

Allow us to close client connections, with or without a stream error. Partially fixes #8, we still need the same for s2s (though it should be almost a straight copy of the code, I'm too tired atm)

Flush write queue before closing socket

Fixed s2s manager's send queue to not store recieved stanza objects (as these can chnage after the send call)

Send unsubscribe and unsubscribed on roster item delete, and broadcast available resources' presence in reply to pre-approved subscription request

Adding logging for outbound presence broadcasts (changed it a bit)

Adding logging for outbound presence broadcasts

Second fix for broadcasting presence of available resources to newly approved contact

Fix for broadcasting presence of available resources to newly approved contact

Moved presence subscription code from stanza_router to presencemanager

Merge with waqas

Fix for putting TLS in stream:features for connections already using TLS. Thanks to albert for spotting.

Fix logging in some cases for client disconnects

Removed unused function send_to_session from sessionmanager (send_to_session replaced by session.send)

Fixed mod_tls to use session.send for sending stanzas

Fixed servermanager to use session.send for sending stanzas

Removed useless [[local send = require "core.sessionmanager".send_to_session]] from mod_uptime and mod_version

Fixed mod_saslauth to use session.send for sending stanzas

Fixed sessionmanager to not send session in place of stream features...

Fixed mod_register to use session.send for sending stanzas

Fixed mod_private to use session.send for sending stanzas

Fixed sessionmanager to use appropriate method for sending stream features

Fixed mod_legacyauth to use session.send for sending stanzas

Fix mod_vcard to use session.send for sending stanzas

Merge with myself (!)

Merge from waqas

Code cleanup for resource binding

Unused variables in mod_tls

You can never have too many tests

Warn when subtest function does not exist

If iq child element has no xmlns, use parent's

Fix mod_roster to use session.send for sending stanzas

Small fix for mod_version

Providing some human readable error messages and some fixes.

Using md5.sum rather than hashes.md5 because we don't want hexadecimal

mod_saslauth: Code cleanup

Made SASL module fit the new interface.

base64 encode the sasl responses

Started using realm in password hashing, and added support for error message replies from sasl

Comment out DIGEST-MD5 until it is fully implemented

Merge new SASL code from Tobias and Waqas

Merging with Waqas' code.

Set username in a SASL object.

Set username on SASL success

Merge with Waqas changes to mod_saslauth.

Made PLAIN method in sasl.lua module follow new interface.

mod_saslauth: Added base64 decoding, encoding check, and cleaned the code up.

Adding some TODO for some security issue.

Merging my new SASL code with Waqas' adjusted saslauth module.

mod_saslauth updated for digest-md5

Rewrote SASL Digest-MD5 responce generating code, fixed some realm related issue and tested it successfully with Psi. Thanks to dwd, remko and jake.

Merging.

Forward response stanzas to sasl.lua and some other stuff.

Fixing some parsing and some other stuff.

Some early attempts on DIGEST-MD5.

Fix logging of disconnect reason, and also sending of unavailable presence on disconnect

Fix routing of outbound iq stanzas

Add tests for core.stanza_router

Add new logger for tests to use

Some fixes for our test runner

Return registered host table when registering a component

Log how many queued stanzas we send

Merge from waqas

Some bugs fixed

Update hostname for identi.ca

Remove some old unused (and empty) functions from s2smanager

Only reply with errors if the stanza is not an error or a result (don't know how much bandwidth this just cost me :) )

Update rostermanager to use new logger

A treat for Linux users ;)

Fix outgoing s2s from components. Fixes #16

Now outgoing s2s sessions are associated with their from_host, fixes #15

Some more logging fixes

Yep, s2s definitely works now. This is just a small fix for logging...

I knew it ;) Fix sending error replies over s2s (though we shouldn't be error'ing on stream:features anyway)

Print out the stanza also

Fix for detecting when we are routing a stanza to ourself (I'm sure this has something to do with you, waqas...)

Another small fix, for logging in s2smanager

Another small fix, for logging in s2smanager

Mmm, s2s fixed :)

Merge from waqas

Added error replies for unhandled stanzas

Added basic offline message support

Added util.datetime: Utility methods to support XEP-0082: XMPP Date and Time Profiles

Added support for storing (and removing), loading and appending to lists of data to datamanager (for supporting offline messages)

Fixed stanza deserialization

Add support for remote debugger

Missed importing a function in last commit

Change sending reply stream header to use top_tag()

Add new top_tag() method to stanzas

Some s2s fixes. Now connect() does not block, and stanzas are not lost when connection is slow

Renamed some of the variables in jid.split test to make it clearer

Fix jid.split test function

Merge from waqas

Fixed typo

Merge from waqas

Added mod_uptime: [XEP-0012: Last Activity] queries now work when directed at the server.

Hack to allow s2s stanzas to work until we do proper namespace handling

Move some code about so that we don't leave connections hanging if they hit the connection timeout

Actually show error and position when we show a traceback :)

Prevent slow connects for s2s from blocking for so long

We don't fail if modules fail to load at startup :)

We now fail if modules fail to load at startup.

Updated usermanager with DIGEST-MD5 support

Fix some very misleading logging

Committing code to get nicer tracebacks for errors, also we no longer consider such errors fatal (probably a bad thing, I know...)

Just committing this warning, because I want to know if the problem really affects us

Add host field to local host sessions

Merge from waqas

Redirecting all stanzas not from origin of type s2sin and c2s to core_handle_stanza

Shortened log output for incoming stanzas and an added check.

Fix for checking components, but we need to look at this whole block to optimise it, really we do

Fixed some whitespace.

Reworked the way lxmppd.cfg is used

Re-applying my changes to componentmanager. Sigh.

Adding component support. Again...

/me glares at waqas for messing up the repo

/me glares at MattJ

Commented a buggy check

Internal component support

Foxed: Copy stanza type in reply for presence and message stanzas

Part 2 of internal components. Should have mentioned that the previous commit was from waqas, this one from me.

Part one of internal component support

Merge (for some reason)

imported patch srv-for-cdr-se.patch

A little whitespace fix

Datamanager now deletes files with no data

Reformatted lxmppd.cfg.dist and removed redundant variable

Removed require "core.stanza_dispatch"

Remove obsolete stanza_dispatch.lua

merge from waqas

Priority based message routing, etc

Added resource priority handling, etc

Fix for previous commit (again)

Fix for previous commit

Fix for add_iq_handler to allow multiple origin types too

vcards for s2s

Fix MD5 loading check

mod_roster fix

Another fix for s2s (well, let's say it was more for modules)

Fix s2s once and for all

General fixes for s2s, to make it more robust (I hope), sending data to remote hosts sane (s2ssession.send() works as expected), recycle outgoing dialback connections, etc.

Fix for mod_version over s2s

mod_version is here

Was a bit hasty to remove send_s2s() from stanza_router. We still use it, and there is no problem with it.

sends2s -> s2s_session.send(), s2s_session.send() -> s2s_session.sends2s()

Added support for XEP-0049: Private XML Storage (mod_private)

mod_vcard: Fixed to use new util.stanza.add_child

Combined some lines

Datamanager Fixes and improvements

Don't set cursor inside added child when using add_child()

Make add_child() behave as expected. Old add_child() is now add_direct_child()

Better logging of s2s connections

Merge presence/subscription support from waqas

Bug fixes and checks for presence subscriptions, etc

Outbound presence subscription

Routing code reorganization

Inbound subscription request

Inbound unsubscribe

Inbound subscription cancellation

Inbound subscription approval

Minor fixes, comments

Little tweak for more useful logging of closed s2s sessions

Log when an incoming dialback verification request is an invalid key for our domain

Remove misleading log message regarding s2s/dialback

Backed out changeset 4adc53e03b4d (garbage collection)

Extra garbage collection, for debugging

other half of previous commit

Clean up session when s2s connections are disconnected

Remove some overly-verbose debug log output

Destroy s2s sendqueue when connection is established successfully and data written

Fix nil concat for good this time (\!)

Fix nil concat when non-existant user is probed (another)

Fix nil concat when non-existant user is probed

Hack until we get SRV resolving

Fix for sessionmanager to not throw error when session doesn't have a private logger

Show error when no MD5 lib available

Fix mod_legacyauth to not use old stanza_dispatch

Merge from waqas

Moved some code and removed unnecessary checks.

Presence fixes (again)

Merging more s2s

Partial s2s commit

s2s works! \o/ \o/ s2s

working incoming s2s \o/ s2s

working outgoing s2s \o/ s2s

dialback keys now verified s2s

No need to comment out s2s in this branch s2s

Backed out changeset 98e9fea75e5b

Backed out changeset 37b3e9ed8918 (again)

Backed out changeset a0fc73d5f48c

Backed out changeset 8f17ba74823c

Reverting stanza_router to non-conflicted version

Making the best attempt out of a bad merge from waqas

Added TODO

Merged from Matthew

Merged from Matthew

Removed .hgtags

Fixed: Works when LuaRocks is not present

Roster updates

Docs update

Presence fixes

Fixed: Some modules did not return anything

Set things up for presence subscriptions.

Initial s2s stuff s2s

Final fix for marking user offline when all resources are gone :)

even faster checking for other sessions... thank you waqas :)

faster checking for other sessions

Fix for not destroying sessions when connection closed.

No s2s yet :)

Added a comment, removed all the old code

TLS/SASL no longer should include the connhandler module

Relocate presence broadcast to core_handle_stanza()

Merge roster & presence from waqas

Fixed: datamanager.store and datamanager.load could crash when username or host arguments were nil. (useful for server specific and global data).

Updated and fixed session documentation

Updated session documentation

Added session property for interested resources

Working presence, presence probes and other fixes

Added: TODO

Fixed: Unhandled stanza handling

Fixed: Roster support

Minor edit, and added a TODO

Added: More complete implementation for mod_roster

Added: Roster manipulation functions to core.rostermanager

Added: presence broadcast

Removed an unnecessary line

Fixed: util/jid.lua now returns module object

Fixed: Typos caused by lack of sleep.

Fixed: mod_roster now outputs all roster data (instead of just the JIDs)

Added some roster management functions

Documented the roster object's structure

Abstract connections with "connection listeners"

server.lua should degrade gracefully when LuaSec not present

Some tiny changes for main.lua

Updated TODO

Remove more of Dolphin's leftovers

Add AUTHORS file

Fix MUC address

Updated pull script for new repo

Fixed: util.stanza.deserialize now handles nil stanzas

Stanza preserialize/deserialize helpers, to strip and restore stanzas respectively. Fixed mod_vcard to use these.

Fixed: incorrect auth check

Minor fix

Merge from Matthew. datamanager.simplesave fix

Added: vCard plugin: mod_vcard

Added: mod_register now replies with an error stanza when file write fails

Added: Datastore support for hosts and global data in addition to users

Fixed routing for IQs to bare JIDs, and added a simple IQ validity check

Fix for saving tables with non-string keys

Merge roster fixes from waqas

Fixed: rostermanager.lua now returns the module

Removed: Unnecessary check in mod_roster. session.roster is guaranteed to be available for "c2s" session type.

Fized: Added check to ensure that resource binding is done after auth.

Load roster on resource bind

Merged docs from paul

Added script to pull from master mercurial repository

Remove debugging output from when doing TLS

Added to a comment

Code cleanup

Added: Local stanza routing

Fixed typo in variable name

forgot to commit mod_tls, oops :)

Beginnings of real stanza routing

Merged local TLS branch

Working TLS! tls

TLS: Handshake works, no data after that tls

Convert spaces->tabs

mod_InBandRegistration -> mod_register

Merged mod_InBandRegistration from waqas

Docs

User registration, etc (jabber:iq:register)

Merge from waqas

Removed unused functions

Fix setting resource before we even know what it is

Merge docs from waqas

Some notes of the stanza and session structures

DEPENDS updated by waqas

Session destruction fixes, some debugging code while we fix the rest. Also change logger to be more useful.

Fix for destruction of unauthed SASL sessions

Added lbase64 to the dependency list

Fix for using wrong auth token as username (fixes Gajim login)

New "import" module to help tidy up all the local declarations at the top of modules

Use xmlns for matching auth tag too

Fix stanza handlers to use xmlns also for matching

Resource binding, XMPP sessions (whatever they're for...)

Small fix for sending stanzas in case of resource binding error

Add "uuid" library and make sessionmanager use this.

Reply to unhandled iq's with service-unavailable

Small fixes

An oops in sessionmanager stream:features code :)

Move stream opening handling from xmlhandlers to sessionmanager

Add support for arbitrary events and event hooks

SASL!

Removed unused functions from main.lua

Moved hosts to a config file, still need better config though

Removed tag tip

Fixed: Session data was never removed from sessions list

Let modules set/write globals

Fix quoting in util/sasl.lua

Remove now useless debug output

Huge commit to:

jid.split(): Return nil when passed nil

Adding initial unit testing scripts

Fixing jid.split() for all JIDs

Merged Paul's branch

Grrr! Don't use KDE apps to view this repo!

Removed ~ files

Some docs written by Thorns. Need reviewing.

Various documentation updates, and added names.txt :)

Updated stanza routing doc

Remove some debugging messages

Merged in Tobias's SASL lib

Beginning of new routing logic

module table was missing

* missing base64 decode of SASL response

adding SASL lib with PLAIN support, not tested yet

Added tests/ folder

Coding style doc, HACKERS file

Moved server module to net/

Remove redundant comments

renaming _ to sock to improve readability

remaned _ to sock to improve readability

added LICENSE file

- Remove some debugging code

Merged 2 heads o_O

Added all the files to please hg :/

Presence unavailable on disconnect

"Shared roster" - well, kind of :)

Working presence!

Switched to new connection framework, courtesy of the luadch project

(0) +480 +1000 +3000 tip

mercurial