25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00
Commit Graph

2308 Commits

Author SHA1 Message Date
Badlop
4d2408c9c9 When module start fails during server start, stop erlang (EJAB-1446) 2011-05-16 22:33:51 +02:00
Christophe Romain
6898553afd Owner can delete any items from its own node (EJAB-1445) 2011-05-06 14:02:37 +02:00
Badlop
a8dd91512c Simplify and particularize the code of previous commit (EJAB-1333) 2011-05-04 23:14:41 +02:00
Badlop
05d95f2dd7 Support in BOSH for stanzas without jabber:client (EJAB-1333) 2011-05-04 23:05:06 +02:00
Badlop
f839b1c6ff Log this cached exception as DEBUG in ejabberd log file 2011-05-04 23:04:07 +02:00
Badlop
b8026d8df7 Reorganize the push_item function, and handle version not_found (EJAB-1420) 2011-04-29 20:34:38 +02:00
Badlop
c611361bbe No need to inform that XEP-0237 is optional; clarified in XEP version 1.2 2011-04-29 20:34:36 +02:00
Badlop
0c7ce8b7fe mod_register Access now also controls account unregistrations 2011-04-26 22:54:28 +02:00
Badlop
34fc5d82b3 Try to improve support for roster_version in MSSQL (EJAB-1437) 2011-04-14 23:10:47 +02:00
Badlop
7436ef1fb1 The responses to HEAD must have empty Body 2011-04-13 10:32:26 +02:00
Badlop
099f7d6521 Support as read-only HTTP method not only GET, also HEAD 2011-04-13 10:32:24 +02:00
Badlop
545162a283 If extauth script crashes, ejabberd should restart it (EJAB-1428) 2011-04-11 21:27:36 +02:00
Badlop
a2d60a1977 Support more captcha_host value formats (EJAB-1418) 2011-04-11 19:58:37 +02:00
Badlop
33745954a9 Store packet table field as binary, not as string 2011-04-11 15:49:06 +02:00
Badlop
028d158e13 Show result of message deletion with colour box 2011-04-11 13:39:48 +02:00
Badlop
b684e90292 First delete messages, and then get the remaining messages 2011-04-11 13:39:46 +02:00
Badlop
191187a279 Store user_host table field as binaries instead of strings 2011-04-11 13:39:43 +02:00
Badlop
80483d8fd1 Migrate MUC tables from 2.1 mnesia to 3.0 gen_storage (EJAB-1372) 2011-04-07 23:55:24 +02:00
Badlop
4689b0d861 Document the mod_muc 2.1.x mnesia tables (EJAB-1372) 2011-04-07 23:55:15 +02:00
Badlop
c73aeca393 Send jid attribute when occupant is banned (EJAB-1432) 2011-04-07 13:12:52 +02:00
Badlop
f893669d91 mod_ping uses iqdisc no_queue by default (thanks to Chris Moos)(EJAB-1435) 2011-04-07 12:09:53 +02:00
Badlop
198298df2c Fix minor comment typo 2011-04-04 17:36:31 +02:00
Badlop
5a876dfd33 Store user_host as binaries in vcard table. Fix migration from old ejabberd 2 tables schema 2011-03-30 19:16:05 +02:00
Christophe Romain
9cf43ffc9e apply pubsub efficiency patch to ODBC code (TECH-1293) 2011-03-23 09:59:10 +01:00
Christophe Romain
8d2def619d add indexes to improve pubsub efficiency (TECH-1293) 2011-03-23 09:36:03 +01:00
Badlop
25a6493e1b Fix typo (thanks to Krzee) 2011-03-17 12:16:54 +01:00
Badlop
71bfa17354 Fix crash when SASL PLAIN denies auth (EJAB-1425) 2011-03-16 18:38:44 +01:00
Badlop
dedd2a7f59 Update the changed string in the PO translation files 2011-03-13 18:41:43 +01:00
Badlop
415a50921f Change string in WebAdmin to reuse an existing one 2011-03-13 18:36:27 +01:00
Badlop
33feca74ec Document that ODBC tables are created by ejabberd itself (EJAB-1421) 2011-03-10 20:29:07 +01:00
Badlop
102dabdefc Only attempt to migrate an old ODBC table if it still exists 2011-03-10 20:29:04 +01:00
Christophe Romain
38bf3bfc1c fix PEP broadcasting (thanks to Karim Gemayel)(EJAB-1411) 2011-03-10 12:24:56 +01:00
Pablo Polvorin
afec527f5f Include client namespace in CAPs queries (EJAB-1411)
When constructing an IQ record, if no namespace is specified
for the IQ,  exmpp treat that literally as "no namespace" and
so put xmlns="" (it do not interpret it as "no change" and let
the parent namespace apply).
So it is neccesarly to especify the jabber:client namespace.

See EXMPP-53.
2011-03-09 16:30:16 -03:00
Badlop
8a135262db Fix bashism and remove duplicate unused option (EJAB-1404) 2011-03-09 16:26:09 +01:00
Pablo Polvorin
3b2af5dfc5 Fix internal-server-error error response (EJAB-1414).
Ejabberd was trying to send a tuple instead of the full error stanza.
2011-03-09 10:30:54 -03:00
Badlop
4caf2c8674 If the port number isn't listener, then specify the protocol (EJAB-1418) 2011-03-03 11:36:35 +01:00
Badlop
6cc950d76f captcha_host must have the port number to get protocol (EJAB-1418) 2011-03-03 00:05:06 +01:00
Badlop
bf8e09038e ejabberdctl needs space between INET_DIST_INTERFACE (thanks to Dale Chase)(EJAB-1416) 2011-02-28 18:42:04 +01:00
Badlop
9a55ced505 Fix to show correctly the command that is unknown 2011-02-23 16:51:40 +01:00
Badlop
62a4e20ae7 Tweak pg2_backport.erl to work with Erlang older than R13A (EJAB-1349) 2011-02-22 23:44:22 +01:00
Badlop
e0bda563e6 Add support for '@online@' Shared Roster Group (thanks to Martin Langhoff)(EJAB-1391)
New version of the @online@ patch originally by Collabora.
Notes:
- the presence push is mediated via the group rather than
  per user - this may reduce memory footprint... _if_ ejabberd
  has some smart optimisation in that codepath
- it assumes that any group with membership @online@ _displays_
  online as well -- this is a simplification and breaks the
  decoupling that ejabberd has in this regard.
2011-02-21 22:32:57 +01:00
Badlop
61e4fde247 Forward old messages to newly spawned extauth process (thanks to Mika Seppänen)(EJAB-1385) 2011-02-21 16:19:45 +01:00
Christophe Romain
7f899ee179 fix broadcast issue (EJAB-1411) 2011-02-21 15:12:31 +01:00
Christophe Romain
75a85beb80 Merge branch 'master' of git+ssh://gitorious.process-one.net/ejabberd/mainline 2011-02-21 14:45:44 +01:00
Christophe Romain
0b7bb342cf fix API issue for subscribe/unsubscribe (EJAB-1410) 2011-02-21 14:45:05 +01:00
Badlop
8f9bf47d78 New route_iq/5 accepting Timeout (thanks to Edwin Fine)(EJAB-1398)
Also new register_iq_response_handler/5
2011-02-21 13:46:59 +01:00
Christophe Romain
15749a2193 server must generate itemid if not given at publish time (EJAB-1409) 2011-02-21 12:08:58 +01:00
Badlop
60d83f937d New DIST_USE_INTERFACE to restrict IP where erlang connections are listened (EJAB-1404) 2011-02-16 23:53:40 +01:00
Badlop
7060791e4e New Indonesian translation (thanks to Irfan Mahfudz Guntur)(EJAB-1407) 2011-02-16 13:46:48 +01:00
Christophe Romain
72395ba497 fix empty pubsub payload check 2011-02-14 16:48:54 +01:00
Christophe Romain
4a2005f7cc update copyright up to 2011 2011-02-14 13:47:22 +01:00
Badlop
90c711162b Provide HTTPS URL in CAPTCHA form when listener has 'tls' option (EJAB-1406) 2011-02-14 13:01:46 +01:00
Badlop
7111ecc1b7 Fix typo in French translation 2011-02-11 20:21:24 +01:00
Badlop
e1cc8a90fa Escape output from ctlexec() to erl script (thanks to Dan Scott)(EJAB-1399) 2011-02-09 16:34:48 +01:00
Christophe Romain
96d1400792 typo fix 2011-02-09 16:32:11 +01:00
Christophe Romain
975e7f47ee fix previous commit issues 2011-02-09 14:27:40 +01:00
Christophe Romain
2f681b05f3 refactor pubsub broadcast to allow large optimization 2011-02-08 19:08:38 +01:00
Badlop
a3dba06baf Remove erroneous comment (EJAB-645) 2011-02-03 17:27:04 +01:00
Badlop
16a97ab903 Handle Tigase's unexpected version=1.0 when ejabberd doesn't announce it (EJAB-1379) 2011-01-31 19:50:56 +01:00
Badlop
d8f339bceb Add to example config file access_from comment 2011-01-28 17:16:36 +01:00
Badlop
798d7bce1b Fix unused variable when code was copied from mod_pubsub.erl 2011-01-27 16:42:27 +01:00
Badlop
a98193ea6e Merge exmpp jlib.erl into ejabberd jlib.erl (EJAB-1377) 2011-01-27 16:30:55 +01:00
Pablo Polvorin
70a2200888 Fix initial presence after roster subscription approval (EJAB-1384)
Send initial presence after the roster subscription workflow
is complete.
2011-01-27 11:05:16 -03:00
Badlop
3391c9cad7 mod_pres_counter prevents subscription flood (thanks to Ahmed Omar and Alexey Shchepin)(EJAB-1388) 2011-01-19 23:44:53 +01:00
Badlop
d5cfdc7f1f Fix delayed response of a timeout call was reused for next login (EJAB-1385) 2011-01-19 19:27:52 +01:00
Badlop
caf64c035f Subsecond timestamp granularity in offline messages (EJAB-1376) 2011-01-18 23:25:41 +01:00
Badlop
bec67378aa Fix compilation bug in BOSH 2011-01-17 17:31:28 +01:00
Badlop
9bb4f124ad Update NODE and HOST with the definitive values from ejabberdctl or command line 2011-01-17 17:28:12 +01:00
Christophe Romain
722fdd6bc7 check_start must grep processes for nodename last 2011-01-17 16:55:00 +01:00
Christophe Romain
d34dab4822 improve check_start, avoid false process match with grep 2011-01-17 16:52:20 +01:00
Badlop
ad357c2f59 Clarify error message when BOSH query is sent to non-running module 2011-01-14 15:48:22 +01:00
Badlop
2d0d46e296 Option to reject S2S connection if untrusted certificate (EJAB-464) 2011-01-11 16:38:33 +01:00
Badlop
d523901ddc Include From attribute in the stream header of outgoing S2S connections 2011-01-11 16:38:32 +01:00
Badlop
41fc44e55f When TLS is required in s2s, add subelement to stream:features starttls 2011-01-11 16:38:30 +01:00
Badlop
befb4fc7ea Add option to require encryption in S2S connections (EJAB-495) 2011-01-11 16:38:28 +01:00
Pablo Polvorin
54557cb867 Send correct from/to attributes in s2s dialback response (EJAB-1363).
We were sending swapped from/to attributes when replying to db:verify requests.
Some servers don't mind about this, but others like prosody checks this and
rejects the verification, the s2s connection in that case couldn't be established.
2011-01-10 17:46:07 -03:00
Badlop
2d3efdf983 Fix old unresolved merge conflicts in pg.sql
Please note that ejabberd takes care to create the tables in your
ODBC database if needed. The file pg.sql is provided for reference
purposes only, as it isn't needed when preparing the database.
2011-01-09 18:51:24 +01:00
Badlop
159529d539 Add start time information in ejabberd log
One way to print that information is to configure in ejabberd.cfg
  {loglevel, {4, [{ejabberd_app, debug}]}}.
2011-01-05 18:38:01 +01:00
Badlop
e3d875d09f Several bugfixes in Caps (thanks to Karim Gemayel)
- fix bug with caps 2.0: ERRORs were logged in some cases
- enhance record definitions
- turn string() data into binary() ones
- remove mod_caps:node_to_binary/2, mod_caps:features_to_binary/1 and mod_caps:binary_to_features/1.

Tested with Psi+ (caps 1.0) and OneTeam (caps 2.0), and they now don't produce ERROR REPORTs.
2010-12-30 20:32:01 +01:00
Badlop
ea84f802e5 Keep the order of stanzas when BOSH sends several (EJAB-1374) 2010-12-30 13:49:26 +01:00
Badlop
20c4919eda Revert buggy previous commit (thanks to W. Andrew Loe III), and add better fix 2010-12-30 13:49:07 +01:00
Badlop
9cbf08700d Provide stacktrace in log report when a transaction fails 2010-12-30 13:47:15 +01:00
Badlop
ff455f1a42 Don't delete the whole table, as other module instances may already have started rooms. 2010-12-30 13:44:53 +01:00
Evgeniy Khramtsov
a4728d14d5 Change c2s state before offline messages resending 2010-12-28 21:12:33 +09:00
Christophe Romain
f2925d8efc new caps processing and related fixes in ejabberd_c2s.erl and miscellaneous fixes in mod_pubsub.erl (Thanks to Karim Gemayel)(EJAB-620) 2010-12-24 16:21:28 +01:00
Badlop
4b0a7fe307 Only call mod_roster when the user is in a local vhost, fixing EJAB-869 2010-12-23 21:05:21 +01:00
Badlop
980d9c37ea Fix bug introduced with an old commit (EJAB-72) 2010-12-23 19:19:00 +01:00
Alexey Shchepin
a40e9c2626 Remove version=1.0 from stream opening when TLS is not available (thanks to Karim Gemayel) 2010-12-23 16:28:35 +02:00
Badlop
897141c9e1 Delete obsolete modules, because now the standard ones use gen_storage 2010-12-23 14:19:59 +01:00
Badlop
d20b6dccb3 Remove log line that was intended only for debugging during development 2010-12-23 13:30:41 +01:00
Badlop
fe909a45e9 Allow auth modules to provide SASL errors; default is "not-authorized".
See
http://tools.ietf.org/html/draft-saintandre-rfc3920bis-09#section-7.4
2010-12-23 13:27:24 +01:00
Alexey Shchepin
bb4a87806f Make jlib:ip_to_list safe to use 2010-12-23 13:17:14 +01:00
Badlop
7ca1c0387c Clean muc_online_room when mod_muc starts (EJAB-1365) 2010-12-23 02:16:00 +01:00
Badlop
8c4e4e5f91 Bugfix in starting persistent rooms when mod_muc odbc (EJAB-1365) 2010-12-23 02:15:58 +01:00
Badlop
93787bee73 Bugfix mod_muc odbc couldn't register nickname (EJAB-1364) 2010-12-23 02:15:56 +01:00
Badlop
d3efcf8682 Document the types of some state elements 2010-12-23 02:15:53 +01:00
Badlop
268e80ece7 Document in mod_muc.erl the gen_storage table schema (EJAB-1368) 2010-12-23 02:15:43 +01:00
Badlop
a33c389b9b Add support in WebAdmin to register vhosts, and a page to restart or remove it 2010-12-23 02:15:40 +01:00
Badlop
9ce44cd0a7 New ejabberd commands to list, register and remove vhosts 2010-12-23 02:15:38 +01:00
Badlop
be8e1bfc35 Fix register of vhost (EJAB-1346) 2010-12-23 02:15:35 +01:00
Badlop
7b2b9412ad Add some variable type hints 2010-12-23 02:15:33 +01:00
Badlop
75f2e775ab Update auth modules to support stopping 2010-12-23 02:15:09 +01:00
Badlop
0859667a8c Fix Type definition 2010-12-21 01:04:52 +01:00
Badlop
563344d219 Remove call to function no longer existent 2010-12-21 01:03:00 +01:00
Evgeniy Khramtsov
a13c9185f7 Make sure 'closed' event is correctly processed on every state 2010-12-17 17:27:52 +09:00
W. Andrew Loe III
1eeff9b0df Export make_sid so we can use it in pre-binding. 2010-12-15 16:58:09 +01:00
Badlop
a47caa8c54 Fix warning about unused variables 2010-12-13 20:59:36 +01:00
Badlop
aee3e30232 Fix some exmpp attribute type 2010-12-11 23:16:17 +01:00
Badlop
d448b6c955 Fix some errors when porting from mod_pubsub.erl (thanks to Karim Gemayel) 2010-12-07 19:36:34 +01:00
Badlop
74f86bef6a Support for X-Forwarded-For HTTP header (EJAB-1356) 2010-12-07 16:51:20 +01:00
Christophe Romain
ce0219c569 update pubsub_odbc patch 2010-12-07 15:22:54 +01:00
Christophe Romain
53cc032251 add node attribute to pubsub subscribe event (EJAB-1361) 2010-12-07 13:53:58 +01:00
Badlop
a8bf889e79 Fix detection of mod_last at server start (EJAB-641) 2010-12-03 17:25:10 +01:00
Badlop
27872c6022 Support PostgreSQL 9.0 (EJAB-1359)(thanks to Stephen Gibberd and Konstantin Nikiforov) 2010-12-03 12:43:27 +01:00
Badlop
c6e0cff144 Fix use of exmpp 2010-12-02 20:14:54 +01:00
Pablo Polvorin
a8ef64ab45 Fix cyrsasl_digest RFC-2831 2.1.2.1 (EJAB-476)
Fix sasl digest bug when username|password|resource strings had
all characters <= U+00FF and at least one character >= U+0080.

Warnning:
Note that by fixing the bug, we may be broking compatibility with clients
that "implements" it.
See comments on https://support.process-one.net/browse/EJAB-476
2010-12-02 12:56:21 -03:00
Christophe Romain
9afaec40f5 fix pubsub cross domain eventing (EJAB-1340) 2010-12-02 14:05:19 +01:00
Evgeniy Khramtsov
8520b76483 Increase maximum restart strategy of the ODBC supervisor. Do not brutally kill ODBC processes on supervisor shutdown to avoid polution of the mnesia table 2010-12-01 14:25:58 +09:00
Badlop
b8f04aae6f When the Password attribute is missing in PIEFXIS file, don't check account auth. 2010-12-01 00:55:29 +01:00
Pablo Polvorin
c9db1f691c Merge branch 'master' of git+ssh://git@gitorious.process-one.net/ejabberd/mainline 2010-11-29 16:56:32 -03:00
Pablo Polvorin
ef572c815f Port to latest exmpp changes (attribute names as binary()).
All atributes are now binary() instead of atoms.
2010-11-29 16:44:31 -03:00
Christopher tofu Zorn
dad3297c9c expose find_connection for routing in other modules (if needed) 2010-11-29 20:06:02 +01:00
Christopher tofu Zorn
312574cbc5 add the ability to send raw xml packets over http bind 2010-11-29 20:06:00 +01:00
Badlop
008a0a29cd Fix characters not allowed in username. Don't include that in translatable string.
List mentioned in:
http://xmpp.org/rfcs/rfc3920.html#nodeprep-prohibited
2010-11-29 19:39:01 +01:00
Badlop
f9e2466867 Support negative part-hour TZ values (thanks to Alexander Zhukov)(EJAB-1301) 2010-11-29 14:35:57 +01:00
Alexey Shchepin
26550efd91 Don't loop when there is nothing after a stream start 2010-11-26 17:11:56 +01:00
Andreas Köhler
7be6e33ea4 Correct domain_certfile tlsopts modifications for s2s connections (EJAB-1086)
* In ejabberd_s2s_out:wait_for_feature_request/2, the domain to use for
  looking up domain_certfile options is #state.myname and not
  #state.server

* If s2s_certfile is not specified, connect should still be part of the
  tls options used by ejabberd_s2s_out

* Add #state.server to ejabberd_s2s_in processes and store the to
  attribute in :wait_for_stream/2. Then use that server in
  :wait_for_feature_request/2 to change the tls options like in
  ejabberd_s2s_out.

Fixes EJAB-1086.
2010-11-26 00:13:36 +01:00
Badlop
7aa48e265a Send Unavailable Presence stanza when an occupant is kicked or banned (EJAB-1350) 2010-11-22 21:16:34 +01:00
Badlop
2ef06678c0 Port SSLVER detection from 2.1.x, needed for ?PG2 (EJAB-1349) 2010-11-22 16:20:40 +01:00
Badlop
2aa56cd86e Use pg2 from R14B in systems with older versions (EJAB-1349)
pg2_backport.erl is a copy of pg2.erl from Erlang/OTP R14B.
That module is used in ejabberd installations where an OTP
previous to R14 is installed.
2010-11-22 16:02:36 +01:00
Badlop
c2dface515 Fix http-bind supervisor to support multiple vhosts (EJAB-1321) 2010-11-17 20:30:37 +01:00
Andreas Köhler
690c56ca6d Fix R12B5 compatibility in ejabberd_http_bind.erl (EJAB-1343)
erlang:max/2 and :min/2 are new functions
2010-11-17 13:03:59 +01:00
Andreas Köhler
aaa69a8c36 Use LFrom and LTo consistently in ejabberd_s2s_in:stream_established/2 (EJAB-1342) 2010-11-17 12:56:18 +01:00
Evgeniy Khramtsov
ec0e0ef8a6 Do not start mod_proxy65 if it is unable to bind an address (EJAB-1336) 2010-11-17 18:13:55 +09:00
Evgeniy Khramtsov
0b8a761a61 Use MEDIUMTEXT type for vcard avatars in MySQL schema (EJAB-1252) 2010-11-17 17:42:04 +09:00
Evgeniy Khramtsov
0ccbd7e3f2 Do not print full error message when LDAP timeout occurs (EJAB-1324) 2010-11-17 17:15:28 +09:00
Evgeniy Khramtsov
549f1029a6 Set SSL_MODE_RELEASE_BUFFERS mode when available (EJAB-1351) 2010-11-17 13:55:35 +09:00
Badlop
da7e53fe3c Temporary workaround for starting stored rooms 2010-11-16 02:13:58 +01:00
Badlop
3e9de2ec79 Provide new, not old, affiliation in kick/ban presence with codes 321 and 301 2010-11-16 01:19:34 +01:00
Badlop
d146ef873d Fix typos in the example configuration file 2010-11-12 22:01:09 +01:00
Andreas Köhler
d8d20d5b88 Before binding tcp ports, checks the socket type and listener options
(EJAB-1334)

If the callback module has a socket type of independent and needs to
create the listener itself, do not pre-bind the port. The same holds if
there are errors in the listener configuration.
2010-11-10 23:45:27 +01:00
Andreas Köhler
1ab92d1159 Bind listener ports early and start accepting connections later
(EJAB-1334)

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-10 23:45:24 +01:00
Badlop
abf069da9e Rollback some Specs that break Dialyzer (thanks to Karim Gemayel)(EJAB-1345) 2010-11-10 21:27:53 +01:00
ppolvorin
f4f949bd72 Fix anonymous user cleanup (EJAB-883)
anonymous users table and vcards were not correctly cleaned up
after the user disconnect.
2010-11-10 13:27:47 -03:00
Andreas Köhler
f4507a088a In mod_last*:get_last_iq/4, check for user resources first to return 0 seconds if there is one
Fixes problem 2 of EJAB-1158.
2010-11-10 15:41:10 +01:00
Andreas Köhler
6b46b8f794 Refactor mod_last to use the same core get_last/2 functionality, but keep 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-10 15:41:09 +01:00
Andreas Köhler
7d93cad452 Before forwarding last activity requests to a user, check that the user's 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-10 15:41:08 +01:00
Andreas Köhler
860d8525ee Remove dead code for NS_VCARD iq packets from ejabberd_c2s
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-10 15:41:07 +01:00
Andreas Köhler
351635d0aa Use ejabberd_c2s:privacy_check_packet/5 for all those hook folded runs in the c2s module 2010-11-10 15:41:06 +01:00
Andreas Köhler
614f13714c Use c2s state data as user and server in ejabberd_c2s:is_privacy_allow
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-10 15:41:05 +01:00