24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-05-31 21:07:55 +02:00
Commit Graph

62 Commits

Author SHA1 Message Date
Badlop
8be6dc7758 Use new shorthand to provide URLs relative to ejabberd Docs 2024-04-24 13:20:30 +02:00
Badlop
a550a1c55c Fix documentation links to new URLs generated by MkDocs 2024-04-24 13:20:26 +02:00
Badlop
589521bfd8 Update copyright year to 2024 (#4139) 2024-01-22 17:29:13 +01:00
Badlop
0d3f8c7b9f Make mod_register_web redirect to page that end with / (#3177)
Code copied from ejabberd_web_admin.erl, commit 5ec21438
2023-04-24 13:43:07 +02:00
Badlop
243697e25a Update copyright year to 2023 (#3967) 2023-01-10 13:52:04 +01:00
Badlop
b3211b1f71 Update copyright year to 2022 2022-02-11 09:39:25 +01:00
Badlop
dab4c0cc10 New allow_modules option to restrict registration modules 2021-12-03 16:09:55 +01:00
Badlop
595b016019 Use mod_register in web register form, so its restrictions are used (#3688) 2021-10-04 12:08:59 +02:00
Badlop
85408662ff Use mod_register to format some common error messages 2021-10-04 12:08:56 +02:00
Holger Weiss
caf07692db mod_register_web: Handle unknown host gracefully
Return a proper error message on registration attempts against unknown
hosts, rather than crashing.

Thanks to Ingo Jürgensmann for reporting the bug.
2021-09-05 13:24:51 +02:00
Badlop
69d362595e Remove obsolete mod_register_web ideas and improve documentation 2021-08-23 14:04:37 +02:00
Badlop
6e0161470e Update newest copyright year to 2021 (#3464) 2021-01-27 17:02:06 +01:00
Badlop
8098b83114 Revert "mod_register language reworked"
This reverts commit 3906b5300c.

# Conflicts:
#	src/mod_register_web.erl
2021-01-22 14:23:05 +01:00
Badlop
59d5cf4d47 Uniformize terms create->register, delete->unregister (#3482) 2021-01-13 16:12:00 +01:00
Allan Nordhøy
3906b5300c
mod_register language reworked 2021-01-13 09:35:36 +01:00
Badlop
50f74c932b Replace Jabber->XMPP and Ejabberd (thanks to Neustradamus)(#3469) 2021-01-11 21:11:20 +01:00
Stu Tomlinson
bd11a00f8f
Use include_lib() to include headers from dependencies (#3369) 2020-09-03 13:45:57 +02:00
Badlop
42c82c9e72 Fix hardcoded URL to register.css and URLS to sections (#3281) 2020-05-19 19:32:06 +02:00
Badlop
8694517c34 Minor fixes in doc 2020-04-09 16:30:21 +02:00
Badlop
2febd1c220 Copy more option explanations from ejabberd Docs site 2020-04-08 18:49:41 +02:00
Badlop
47c5aba1e5 Allow mod_register_web to be accessed from now-served vhosts (#3173) 2020-02-26 13:57:19 +01:00
Badlop
2d32c66fd7 Update copyright to 2020 (#3149) 2020-01-28 15:49:23 +01:00
Evgeny Khramtsov
97da380acd Generate ejabberd.yml.5 man page from source code directly
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).
2020-01-08 12:24:51 +03:00
Evgeny Khramtsov
5770946f03 Correctly handle unicode in log messages 2019-09-23 15:17:20 +03:00
Evgeny Khramtsov
9ec69b8d62 Don't treat 'Host' header as a virtual XMPP host
Fixes #2989
2019-08-13 18:30:28 +03:00
Evgeny Khramtsov
a3e0cbbdd8 Make logging messages more consistent 2019-06-24 20:32:34 +03:00
Evgeny Khramtsov
00f2a736eb Improve extraction of translated strings
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")).
2019-06-22 17:08:45 +03:00
Evgeny Khramtsov
a02cff0e78 Use new configuration validator 2019-06-14 12:33:26 +03:00
Holger Weiss
6c0d6f0774 mod_register_web: Don't crash if user exists
Since commit 633b68db11,
ejabberd_auth:try_register/3 returns {error, exists} rather than
{atomic, exists}.

Thanks to Thomas Leister for reporting the issue.
2019-06-05 18:28:35 +02:00
Badlop
55417dfb37 Update copyright to 2019 (#2756) 2019-01-08 22:53:27 +01:00
Badlop
c9ba0e83d2 Handle ejabberd_captcha error reports in mod_register_web (#2553) 2018-08-02 18:36:41 +02:00
Evgeniy Khramtsov
fd8e07af47 Get rid of ejabberd.hrl header
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
2018-06-14 14:00:47 +03:00
Evgeniy Khramtsov
ba2b650464 Introduce new gen_mod callback: mod_options/1
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.
2018-01-23 10:54:52 +03:00
Evgeniy Khramtsov
cdc7c1d1ed Update copyright dates 2018-01-05 23:18:58 +03:00
Evgeniy Khramtsov
d22ee24e72 Better handle mobile devices in CSS of mod_register_web
Thanks to Marek Foss. Fixes #2039
2017-10-09 21:46:38 +03:00
Evgeniy Khramtsov
cdb191bb48 Rename is_user_exists -> user_exists 2017-05-11 15:49:06 +03:00
Evgeniy Khramtsov
633b68db11 Use cache for authentication backends
The commit introduces the following API incompatibilities:

In ejabberd_auth.erl:
* dirty_get_registered_users/0 is renamed to get_users/0
* get_vh_registered_users/1 is renamed to get_users/1
* get_vh_registered_users/2 is renamed to get_users/2
* get_vh_registered_users_number/1 is renamed to count_users/1
* get_vh_registered_users_number/2 is renamed to count_users/2

In ejabberd_auth callbacks
* plain_password_required/0 is replaced by plain_password_required/1
  where the argument is a virtual host
* store_type/0 is replaced by store_type/1 where the argument is
  a virtual host
* set_password/3 is now an optional callback
* remove_user/3 callback is no longer needed
* remove_user/2 now should return `ok | {error, atom()}`
* is_user_exists/2 now must only be implemented for backends
  with `external` store type
* check_password/6 is no longer needed
* check_password/4 now must only be implemented for backends
  with `external` store type
* try_register/3 is now an optional callback and should return
  `ok | {error, atom()}`
* dirty_get_registered_users/0 is no longer needed
* get_vh_registered_users/1 is no longer needed
* get_vh_registered_users/2 is renamed to get_users/2
* get_vh_registered_users_number/1 is no longer needed
* get_vh_registered_users_number/2 is renamed to count_users/2
* get_password_s/2 is no longer needed
* get_password/2 now must only be implemented for backends with
  `plain` or `scram` store type

Additionally, the commit introduces two new callbacks:
* use_cache/1 where the argument is a virtual host
* cache_nodes/1 where the argument is a virtual host

New options are also introduced: `auth_use_cache`, `auth_cache_missed`,
`auth_cache_life_time` and `auth_cache_size`.
2017-05-11 14:37:21 +03:00
Evgeniy Khramtsov
fddd6110e0 Don't validate an option in gen_mod:get*opt() functions
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.
2017-04-30 19:01:47 +03:00
Evgeniy Khramtsov
603ec9cb19 Don't pass empty resource to jid:make() 2017-02-25 10:01:01 +03:00
Evgeniy Khramtsov
3c4057ff55 Reload modules when reloading configuration file 2017-02-22 19:46:47 +03:00
Badlop
5fdd1c39fe Update copyright date automatically (#1442) 2017-01-02 21:42:06 +01:00
Evgeniy Khramtsov
b31ebd2ea0 Rewrite captcha to use XML generator 2016-07-28 15:10:41 +03:00
Evgeniy Khramtsov
4220a2b98c Make modules loading in a dependent order (#1191) 2016-07-06 14:58:48 +03:00
Paweł Chmielowski
3a8da27d86 Use {access,shaper}_rules_validator in other places where access rules are used 2016-06-21 13:18:24 +02:00
Evgeniy Khramtsov
46568fb959 Merge commit 'refs/pull/524/head' of github.com:processone/ejabberd into sasl-api-change 2016-03-25 18:16:50 +03:00
Holger Weiss
6d8c7232d8 mod_register_web: Choose the right error messages 2016-02-29 00:39:57 +01:00
Christian Dröge
30388fa2bf Allow to modify host when deleting account or changing password over web 2016-02-04 21:31:16 +01:00
Badlop
f448ff608a Update copyright to 2016 (#901) 2016-01-13 12:29:14 +01:00
Badlop
0df6d7ae39 Improve explanation in registration page (#876) 2015-12-28 15:08:59 +01:00
Evgeniy Khramtsov
95265dd3ad Move JID related functions to jid.erl (#847) 2015-11-24 18:44:13 +03:00