aboutsummaryrefslogtreecommitdiff
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2010-11-10Bind listener ports early and start accepting connections laterAndreas Köhler1-31/+69
It may happen that auth or rdbms client tcp connections bind a local socket to a port number required by a configered listener. The ejabberd applications fails to start up and needs to be restarted. In plain C you would bind(2) the listener port and listen(2) later on. gen_tcp:listen/2 does not allow to separate these two steps though, so another way is not to accept connections while start up. OTOH, the kernel will syn/ack incoming connections and receive data, leaving them in a buffer for the ejabberd to read from. If this is unwanted, a load balancer would need to receive data from the ejabberd server before adding the node to its pool. This patch binds tcp ports while initializing the ejabberd_listener process, storing ListenSockets in an ets table. start_listeners/0 will reuse these ports later on.
2010-11-10In mod_last*:get_last_iq/4, check for user resources first to return 0 ↵Andreas Köhler2-20/+38
seconds if there is one Fixes problem 2 of EJAB-1158.
2010-11-10Refactor mod_last to use the same core get_last/2 functionality, but keep ↵Andreas Köhler2-43/+52
api stable The local function get_last/4 has been renamed to get_last_iq/4, since it converts the result of get_last/2 (typically {ok, TimeStamp, Status}) to an iq packet.
2010-11-10Before forwarding last activity requests to a user, check that the user's ↵Andreas Köhler1-0/+18
presence is visible for From According to XEP-0012, 4. Online User Query, "if the requesting entity is not authorized to view the user's presence information (normally via a presence subscription as defined in XMPP IM), the user's server MUST NOT deliver the IQ-get to an available resource but instead MUST return a <forbidden/> error in response to the last activity request." So check for a subscription of from of the jid and bare jid and whether outgoing presences to From are allowed. Fixes problem 3 of EJAB-1158.
2010-11-10Remove dead code for NS_VCARD iq packets from ejabberd_c2sAndreas Köhler1-12/+0
For EJAB-1045, the special NS_VCARD block for handling incoming vcard iqs on behalf of clients has already been restricted to cases where the user or resource part of the recipient is empty. But then the packets should not have been routed to the c2s process anyway. This patch completely removes it.
2010-11-10Use ejabberd_c2s:privacy_check_packet/5 for all those hook folded runs in ↵Andreas Köhler1-95/+16
the c2s module
2010-11-10Use c2s state data as user and server in ejabberd_c2s:is_privacy_allowAndreas Köhler1-15/+16
is_privacy_allow is only used in ejabberd_c2s:handle_info/3 to determine for a few presence types whether the packet is allowed to be forwarded to the user's client. This only makes sense if To#jid.user and To#jid.server match StateData#state.user and StateData#state.server. Also, add the atom in as parameter to a new argument Dir of is_privacy_allow and extract from that function privacy_check_packet(StateData, From, To, Packet, Dir) which runs the privavcy check without converting allow/deny to true/false.
2010-11-10Correct error responses of forbidden offline last activity queriesAndreas Köhler2-4/+4
According to XEP-0012 Last Activity, the server must return iq errors with forbidden instead of not-allowed. Fixes problem 1 of EJAB-1158.
2010-11-10populate pubsub#roster_groups_allowed in node configuration options (thanks ↵Christophe Romain1-2/+13
to Karim Gemayel)(EJAB-1344)
2010-11-09fix bad plugin order issue injected in previous patch (EJAB-1286)Christophe Romain1-1/+1
2010-11-09Correct privacy check direction in mod_last (EJAB-1339)Andreas Köhler2-4/+4
The change for EJAB-1271 to change the direction of the privacy check from out to in violates the idea that the check should imitate a subscription state check of from. Rather correct the order of the From and To parameters.
2010-11-08Change max restart strategy of ejabberd_odbc_sup to handle some SQL timeouts.Andreas Köhler1-1/+1
2010-11-08avoid node_call to break transaction (thanks to Karim Gemayel)(EJAB-1286)Christophe Romain1-6/+11
2010-11-07Re-raise exceptions caught in gen_mod:start_module/3 (EJAB-1335)Andreas Köhler1-5/+5
Modules configured by the administrator normally should not be treated as optional, so a exception (error, exit, throw) to start them should not be caught and logged only. This patch re-raises a caught exception instead of ignoring the exception and inserting the module's opts on success. That way gen_mod:get_module_opt/4 should work while calling Module:start/2.
2010-11-06Take care of xml:lang attribute in unauthenticated stanzas as wellEvgeniy Khramtsov1-1/+11
2010-11-05New ip_access option restricts which IPs can register (thanks to Alexey ↵Badlop2-5/+105
Shchepin)(EJAB-915)
2010-11-05Disable mod_register_web in default config because by default captcha is ↵Badlop1-3/+3
disabled
2010-11-05Added mod_register_web: web page for account registration (EJAB-471)Badlop3-0/+626
2010-11-05Disable LRU caching algorithm for LDAP shared rostersEvgeniy Khramtsov2-53/+96
2010-11-05Do not store long language tag to avoid possible DoS/flood attacksEvgeniy Khramtsov1-1/+13
2010-11-05LDAP shared roster support (thanks to Realloc and Marcin Owsiany)Evgeniy Khramtsov1-0/+672
2010-11-03Fixes a leak of ejabberd_receiver processes.Jonas Ådahl1-1/+7
When a (non-frontend) socket module without any custom receiver fails to start, the newly created ejabberd_receiver process needs to be properly closed.
2010-11-02Implement the mod_irc option default_encoding, it was already documentedBadlop1-6/+22
Related: http://www.ejabberd.im/node/4270#comment-56609 http://www.ejabberd.im/node/4270#comment-56780
2010-11-02Fix crash in ejabberd_c2s when blacklist hook returned true (thanks to Jonas ↵Badlop2-2/+5
Ådahl) Cause of the crash jlib:ip_to_list/1 only supports IP tuples using the form {N1,N2,N3,N4} which is not the case when IPv6 is enabled.
2010-11-01Do not run set_last request inside a transactionEvgeniy Khramtsov1-8/+20
2010-10-28Fix errors in EDoc commentsBadlop1-3/+3
2010-10-27Include a Required xml element in the captcha fieldBadlop1-2/+4
2010-10-26Ignore Length argument to tls:recv/[23] (EJAB-1327)Andreas Köhler1-2/+4
The Length argument cannot be used for gen_tcp:recv/3, because the compressed size does not equal the desired uncompressed one.
2010-10-26Re-use the TLSSock argument in tls:send/2 (EJAB-1327)Andreas Köhler1-2/+2
2010-10-26* Add top-level instructions for x:data incompatible clientsEvgeniy Khramtsov1-2/+7
* Remove trailing dot
2010-10-25Changes in registration form to workaround client problems (EJAB-1262)Badlop2-5/+13
Changes included: * Remove var in fixed field because Gajim and Tkabber display it to user * Add workaround for Psi's overlap fields * Add var=url attribute, required by Psi to display the field * Provide the image URL as a copy-able form field
2010-10-25Workaround for Psi's wrong Type in form submissionBadlop1-0/+2
2010-10-25Add CAPTCHA example configurations to cfg (EJAB-1262)(EJAB-1326)Badlop1-0/+10
2010-10-25Provide image url in registration form when captcha is enabledEvgeniy Khramtsov1-1/+7
2010-10-24Add password entropy check (EJAB-1326)Evgeniy Khramtsov2-31/+84
2010-10-24* Rename option captcha to captcha_protected for consistency.Evgeniy Khramtsov1-1/+1
* Document captcha_protected option
2010-10-24CAPTCHA IBR support (EJAB-1262)Evgeniy Khramtsov2-39/+179
2010-10-21improve documentation (thanks to Karim Gemayel)Christophe Romain3-256/+325
2010-10-19Change directory before any operation to one readable by INSTALLUSER (EJAB-1322)Peter Lemenkov1-0/+4
This is required in order to suppress error messages like "File operation error: eacces" when ejabberd was started from directory, which is not readable by INSTALLUSER (/root, for example). See rhbz #564686: https://bugzilla.redhat.com/564686 Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2010-10-19Fix bug in mod_pubsub in_subscription return valueBadlop1-4/+6
2010-10-18documentation update (thanks to Karim Gemayel)Christophe Romain1-102/+139
2010-10-16When privacy list denies local user's outgoing stanza, try to return error ↵Badlop1-0/+4
(EJAB-1320) See: http://xmpp.org/extensions/xep-0016.html#example-51 Example 51. Error: contact is blocked
2010-10-16Check privacy of outgoing IQ stanzas (EJAB-1320)Badlop1-2/+1
2010-10-16Check privacy of incoming IQ stanzas (EJAB-1320)Badlop2-5/+9
2010-10-15Add support to ejabberd_ctl to handle anonymous command argumentsBadlop1-0/+4
2010-10-15Rename aclocal.m4 to acinclude.m4 (thanks to Andreas Köhler)Badlop1-6/+6
Also fixed minor typos, added the compiled aclocal.m4 to gitignore. As the 2.1.x branch includes the 'configure' script, it isn't needed to document here how to build it, only in the master branch. Related documentation: http://www.gnu.org/software/hello/manual/automake/Local-Macros.html#Local-Macros http://www.gnu.org/software/hello/manual/automake/Invoking-aclocal.html#Invoking-aclocal
2010-10-15Fix errors detected by DialyzerBadlop3-8/+11
2010-10-15Document ejabberd_loglevel using EDoc (EJAB-225)Badlop1-0/+13
2010-10-15Fix unused variable warning in ejabberd_loglevelAndreas Köhler1-1/+1
2010-10-15Add set_custom/2, clear_custom/0 and clear_custom/1 to ejabberd_loglevelAndreas Köhler1-1/+29