summaryrefslogtreecommitdiff
path: root/src/ejabberd_c2s.erl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mod_roster: Change hook type from #roster{} to #roster_item{}Linus Jahn2022-08-111-7/+5
| | | | | | | | The problem with #roster{} is that every new record entry is also stored in the mnesia roster table. Adding the mix_participant_id there makes no sense because the normal roster items are no MIX channels. Using \#roster_item{} for the hook and #roster{} for storing the normal items seems to be a better idea.
* Update copyright year to 2022Badlop2022-02-111-1/+1
|
* Make dialyzer happyPaweł Chmielowski2022-02-021-4/+8
|
* One more place where we need to handle socket field not being availablePaweł Chmielowski2022-02-021-3/+3
|
* Don't expect that socket will be available in c2s_terminated hookPaweł Chmielowski2022-02-021-3/+3
| | | | | | | For detached connection we free socket, so let's make code account for this (and we really need it for printing debug informations). This makes sure we call ejabberd_sm:close_session
* Use multicast routing for more packets generated by mucPaweł Chmielowski2021-07-131-1/+1
|
* Update newest copyright year to 2021 (#3464)Badlop2021-01-271-1/+1
|
* Allow to use different hash for storing scram passwordsPaweł Chmielowski2020-12-081-6/+11
|
* Add support for SCRAM-SHA-{256,512}-{PLUS} authenticationPaweł Chmielowski2020-12-031-1/+6
|
* Use include_lib() to include headers from dependencies (#3369)Stu Tomlinson2020-09-031-1/+1
|
* mod_stream_mgmt: Don't kill new PID on resumptionHolger Weiss2020-06-011-5/+3
| | | | | | | | | | | | | | | | | | | During XEP-0198 resumption, the ejabberd_c2s process that handles the new connection reopens the ejabberd_sm session of the old one. Since commit b4770815c0b0416c21d01507d2908f94c25b3097, the new process adds the new session table entry before the old process removes the old one. While adding the new one, ejabberd_sm checks for old sessions to replace. This check assumes old SIDs compare lower than new ones. This assumption didn't necessarily hold for the session resumption case, where the old SID's timestamp was copied over to the new SID and only the PID was updated. Therefore, the new process was killed if the new PID happened to be smaller than the old one. Fix this by having mod_stream_mgmt use its own SM-ID rather than copying over the old SID's timestamp to the new SID. Thanks to Thilo Molitor and Friedrich Altheide for reporting the issue, and to Thomas Leister for his help with debugging it.
* Unconditionally send presence unavailable to all pres_a recipientPaweł Chmielowski2020-05-071-26/+37
| | | | | | | Previously we only send that presence to direct presence recipients if client also sent general self presence (without to attribute). This should help with issue #3245
* Set 'max_fsm_queue' default value (back) to 10000Holger Weiss2020-05-051-1/+1
| | | | | | | | | | The default value for the 'max_fsm_queue' option was set to 10000 in commit 79685da90b514a49f9c412e31dccc17be9dd8680, and that value is still documented to be the default. It was (probably unintentionally) changed to 5000 in commit 03de853e4fdcf852ae75a86922c08bb1a0950e6d. It makes sense to keep it larger than the value of mod_stream_mgmt's 'max_ack_queue' option.
* Don't offer X-OAUTH2 if the only auth method enabled is Anonymous (#3209)Badlop2020-04-271-1/+1
|
* Make session iq response have from be set to server jidPaweł Chmielowski2020-04-161-1/+5
| | | | | | It looks like old version of Smack don't accept request that are have from sent to sender jid, but are only working when jid is set to server address. This is also how it looks in old xmpp rfc examples.
* Fix potential message loss in terminating c2s sessionsPaweł Chmielowski2020-04-011-6/+6
| | | | | | | | | | Calling sync version of xmpp_stream_in/out:stop could lead to messages never being processed by c2s process if they were queued in p1_server. This could be reproduced by when having messages in offline storage, starting sessions, enabling stream_mgmt, sending initial presence, and then immediately </stream:stream>, messages that mod_offline would send process would not be bounced back by stream_mgmt.
* Do not change to attribute of sent messages from bare to full jidPaweł Chmielowski2020-03-251-1/+5
| | | | This is not correct per xmpp spec
* Make bounce_message_queue wait for 100ms for incoming messagesPaweł Chmielowski2020-03-231-1/+1
| | | | | | | There is possibilty that between c2s process unregistering itself from sm and terminating, some other process could try to send something to c2s, which could result in messages to triggering mam/offline hooks, and causing them not to be stored in any way.
* Update copyright to 2020 (#3149)Badlop2020-01-281-1/+1
|
* Correctly handle unicode in log messagesEvgeny Khramtsov2019-09-231-7/+7
|
* Report connection error before waiting for resumptionEvgeny Khramtsov2019-08-061-1/+1
| | | | In other words don't hide the reason why c2s connection has failed
* Process unexpected messages uniformlyEvgeny Khramtsov2019-07-121-5/+13
|
* Fix formattingEvgeny Khramtsov2019-07-031-2/+2
|
* Get rid of useless dialyzer instructionsEvgeny Khramtsov2019-07-011-2/+0
|
* Make sure queue bouncing doesn't yield into infinite recursionEvgeny Khramtsov2019-06-261-9/+19
|
* Make logging messages more consistentEvgeny Khramtsov2019-06-241-2/+2
|
* Improve extraction of translated stringsEvgeny Khramtsov2019-06-221-6/+7
| | | | | | | | | | | | | Now every such string MUST be encapsulated into ?T() macro. The macro itself is defined in include/translate.hrl. Example: -module(foo). -export([bar/1]). -include("translate.hrl"). bar(Lang) -> translate:translate(Lang, ?T("baz")).
* Fix shaper selection in ejabberd_c2sEvgeny Khramtsov2019-06-221-2/+2
|
* Make option 'validate_stream' globalEvgeny Khramtsov2019-06-211-1/+1
|
* Use new configuration validatorEvgeny Khramtsov2019-06-141-129/+62
|
* Modify arguments of c2s_auth_result hookEvgeny Khramtsov2019-05-151-18/+29
| | | | | The hook now accepts `true | {false, Reason :: binary()}` arguments instead of just `true | false`
* Rename listening callback from start/2 to start/3Evgeny Khramtsov2019-04-011-5/+5
| | | | | This will prevent conflicts in callback names in mod_mqtt Old callback function is still supported.
* Replace code using p1_time_compat wrapper with native functionsPaweł Chmielowski2019-02-271-2/+2
| | | | | | | Since we now require R19, we shouldn't need that anymore. There are still couple places where p1_time_compat:unique_timestamp() is used as there is no direct equivalent.
* Merge pull request #2680 from Iperity/fix-privacy-check-on-presence-probebadlop2019-01-091-3/+4
|\ | | | | Privacy lists: set from/to on packet *before* calling privacy_check_p…
| * Privacy lists: set from/to on packet *before* calling privacy_check_packetNathan Bruning2018-11-101-3/+4
| |
* | Update copyright to 2019 (#2756)Badlop2019-01-081-1/+1
| |
* | Don't lose carbons on presence change or session resumptionEvgeny Khramtsov2018-12-101-9/+5
|/
* Add send_ws_ping to c2sPaweł Chmielowski2018-10-291-1/+6
|
* Move some functions from xmpp back into ejabberdHolger Weiss2018-10-251-1/+1
|
* Move certificates processing code to pkix applicationEvgeny Khramtsov2018-09-271-2/+2
| | | | | | | | ==== WARNING: MUST BE ADDED TO RELEASE NOTES ===== The commit introduces the following incompatibility: - Option 'ca_path' is deprecated and has no effect anymore: option 'ca_file' should be used instead if needed. ==================================================
* Switch more log message to warning levelEvgeny Khramtsov2018-09-191-8/+8
| | | | | The commit is supposed to improve logging at loglevel 3, which is the recommended level for high loaded ejabberd servers
* Remove useless type specsEvgeny Khramtsov2018-09-181-1/+0
|
* Refactor ejabberd_listenerEvgeny Khramtsov2018-09-181-38/+39
|
* Refactor ejabberd listener APIEvgeny Khramtsov2018-09-171-17/+9
|
* Fix some dialyzer warningsEvgeny Khramtsov2018-09-091-31/+4
|
* Don't set termination reason into presence-unavailable statusEvgeniy Khramtsov2018-09-011-1/+0
| | | | Fixes https://github.com/processone/xmpp/issues/35
* Move XMPP stream and SASL processing to xmpp repoEvgeniy Khramtsov2018-07-061-16/+29
|
* Move move randoms module to p1_utils repoEvgeniy Khramtsov2018-07-051-1/+1
|
* Get rid of ejabberd.hrl headerEvgeniy Khramtsov2018-06-141-6/+5
| | | | | | | | | The header consisted of too many unrelated stuff and macros misuse. Some stuff is moved into scram.hrl and type_compat.hrl. All macros have been replaced with the corresponding function calls. TODO: probably type_compat.hrl is not even needed anymore since we support only Erlang >= OTP 17.5
* Add validator for 'accept_interval' listening optionEvgeniy Khramtsov2018-04-301-1/+3
|