aboutsummaryrefslogtreecommitdiff
path: root/src/mod_block_strangers.erl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2022Badlop2022-02-111-1/+1
|
* If stanza is type error, allow it passing (#3290)Badlop2021-03-091-1/+2
|
* Update newest copyright year to 2021 (#3464)Badlop2021-01-271-1/+1
|
* Use include_lib() to include headers from dependencies (#3369)Stu Tomlinson2020-09-031-1/+1
|
* Update copyright to 2020 (#3149)Badlop2020-01-281-1/+1
|
* Generate ejabberd.yml.5 man page from source code directlyEvgeny Khramtsov2020-01-081-1/+52
| | | | | | | Several documentation callbacks (doc/0 and mod_doc/0) are implemented and `ejabberdctl man` command is added to generate a man page. Note that the command requires a2x to be installed (which is a part of asciidoc package).
* Correctly handle unicode in log messagesEvgeny Khramtsov2019-09-231-2/+2
|
* Add/improve type specsEvgeny Khramtsov2019-07-101-0/+9
|
* Improve extraction of translated stringsEvgeny Khramtsov2019-06-221-4/+5
| | | | | | | | | | | | | 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")).
* Use new configuration validatorEvgeny Khramtsov2019-06-141-17/+16
|
* Update copyright to 2019 (#2756)Badlop2019-01-081-1/+1
|
* Drop some macros related to OTP<19Evgeny Khramtsov2018-11-291-21/+1
|
* Avoid code duplication when checking presence subscriptionEvgeniy Khramtsov2018-06-281-13/+3
|
* Don't check packets sent to selfEvgeniy Khramtsov2018-06-271-1/+4
|
* Get rid of ejabberd.hrl headerEvgeniy Khramtsov2018-06-141-1/+0
| | | | | | | | | 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
* Introduce 'access' option for mod_block_strangerEvgeniy Khramtsov2018-02-171-4/+10
| | | | | | | | | | The option is supposed to be used when `allow_local_users` and `allow_transports` are not enough. It's an ACL where `deny` means the message will be rejected (or a CAPTCHA would be generated for a presence), and `allow` means the sender is whitelisted and the stanza will pass through. The default value is `none`, which means nothing is whitelisted.
* Fix a typo in call to create_captcha()Evgeniy Khramtsov2018-01-261-1/+1
| | | | Thanks to Paul Schaub for spotting this
* Introduce option 'captcha' for mod_block_strangersEvgeniy Khramtsov2018-01-261-34/+111
| | | | | | | | | | When the option is set to `true`, the module will generate CAPTCHA challenges for incoming subscription requests. The option also implies that option `drop` is set to `true`. Note that the module won't generate CAPTCHA challenges for messages: they will still be rejected if `drop` is set to `true`. Fixes #2246
* mod_block_strangers: Bounce groupchat to bare JIDHolger Weiss2018-01-241-1/+8
| | | | | If a blocked message is of type 'groupchat', address the error message to the bare JID (rather than sending it as MUC PM).
* Introduce new gen_mod callback: mod_options/1Evgeniy Khramtsov2018-01-231-7/+12
| | | | | | | The callback is supposed to provide known options and their default values, as long as the documentation. Passing default values into get_mod functions is now deprecated: all defaults should be provided by the Mod:mod_options/1 callback.
* Update copyright datesEvgeniy Khramtsov2018-01-051-1/+1
|
* mod_block_strangers: Bounce an error messageHolger Weiss2018-01-031-2/+5
| | | | | | | Return a stanza error when a message is rejected, in order to make legitimate users aware of the issue. Closes #2197.
* Introduce option 'allow_transports'Evgeniy Khramtsov2017-09-081-10/+39
| | | | | | | | This is a boolean option. If set to `true` and some server's JID is in user's roster, then messages from any user of this server are accepted even if no subscription present. The option is enabled by default.
* Always accept messages from local (sub)domainsEvgeniy Khramtsov2017-09-071-1/+1
|
* Fix a typo and improve logging messageEvgeniy Khramtsov2017-09-071-4/+4
|
* Block messages from strangers before mod_mam/mod_offline processingEvgeniy Khramtsov2017-09-021-18/+36
| | | | Fixes #1713
* Revert "Fix get_module_opt call in mod_block_strangers"Christophe Romain2017-07-271-4/+1
| | | | This reverts commit e5f64bc24af581b7e8ffd73e7490cc93423d960b.
* Fix get_module_opt call in mod_block_strangersAlexey Shchepin2017-07-271-1/+4
|
* Add allow_local_users to mod_block_strangers (#1804, #1809)Alexey Shchepin2017-06-291-2/+7
|
* Implement cache for rosterEvgeniy Khramtsov2017-05-171-27/+28
|
* Don't validate an option in gen_mod:get*opt() functionsEvgeniy Khramtsov2017-04-301-8/+2
| | | | | | | | | | | | | | The changes are very similar to those from previous commit: * Now there is no need to pass validating function in gen_mod:get_opt() and gen_mod:get_module_opt() functions, because the modules' configuration keeps already validated values. * New functions gen_mod:get_opt/2 and gen_mod:get_module_opt/3 are introduced. * Functions gen_mod:get_opt/4 and get_module_opt/5 are deprecated. If the functions are still called, the "function" argument is simply ignored. * Validating callback Mod:listen_opt_type/1 is introduced to validate listening options at startup.
* Don't block contacts with subscription=to in mod_block_strangers (#1609)Alexey Shchepin2017-03-211-3/+9
|
* Reload modules when reloading configuration fileEvgeniy Khramtsov2017-02-221-1/+4
|
* Compatibility with R17 in mod_block_strangersAlexey Shchepin2017-01-231-1/+20
|
* Check message subject in mod_block_strangersAlexey Shchepin2017-01-231-1/+2
|
* Drop only messages with <body/> in mod_block_strangersAlexey Shchepin2017-01-171-1/+2
|
* Stop hook on message drop in mod_block_strangersAlexey Shchepin2017-01-161-1/+1
|
* Use user_receive_packet hook in mod_block_strangersAlexey Shchepin2017-01-161-11/+10
|
* Remove stub in mob_block_strangersAlexey Shchepin2017-01-161-4/+4
|
* Add mod_block_strangersAlexey Shchepin2017-01-161-0/+107