Skip to content

Commit

Permalink
Annotate captcha_cmd option, run make options, update man
Browse files Browse the repository at this point in the history
  • Loading branch information
badlop committed Oct 25, 2022
1 parent bb22f57 commit 2ef71a6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Core:
- Add `log_burst_limit_*` options ([#3865](https://github.com/processone/ejabberd/issues/3865))
- Support `ERL_DIST_PORT` option to work without epmd
- Auth JWT: Catch all errors from `jose_jwt:verify` and log debugging details ([#3890](https://github.com/processone/ejabberd/issues/3890))
- CAPTCHA: Support `@VERSION@` and `@SEMVER@` in `captcha_cmd` option ([#3835](https://github.com/processone/ejabberd/issues/3835))
- HTTP: Fix unix socket support ([#3894](https://github.com/processone/ejabberd/issues/3894))
- HTTP: Handle invalid values in `X-Forwarded-For` header more gracefuly
- Listeners: Let module take over socket
Expand Down
19 changes: 17 additions & 2 deletions man/ejabberd.yml.5
Original file line number Diff line number Diff line change
Expand Up @@ -559,12 +559,26 @@ A maximum number of items (not memory!) in cache\&. The rule of thumb, for all t
\fIrouter_cache_size\fR, and
\fIsm_cache_size\fR\&.
.RE
.sp
\fINote\fR about the next option: improved in 21\&.10:
.PP
\fBcaptcha_cmd\fR: \fIPath\fR
.RS 4
Full path to a script that generates
CAPTCHA
images\&. There is no default value: when this option is not set, CAPTCHA functionality is completely disabled\&.
images\&. @VERSION@ is replaced with ejabberd version number in XX\&.YY format\&. @SEMVER@ is replaced with ejabberd version number in semver format when compiled with Elixir\(cqs mix, or XX\&.YY format otherwise\&. There is no default value: when this option is not set, CAPTCHA functionality is completely disabled\&.
.sp
When using the ejabberd installers or container image, the example captcha scripts can be used like this:
.sp
.if n \{\
.RS 4
.\}
.nf
captcha_cmd: /opt/ejabberd\-@VERSION@/lib/ejabberd\-@SEMVER@/priv/bin/captcha\&.sh
.fi
.if n \{\
.RE
.\}
.RE
.PP
\fBcaptcha_host\fR: \fIString\fR
Expand Down Expand Up @@ -1474,7 +1488,8 @@ if the latter is not set\&.
\fBs2s_timeout\fR: \fItimeout()\fR
.RS 4
A time to wait before closing an idle s2s connection\&. The default value is
\fI10 minutes\fR\&.
\fI1\fR
hour\&.
.RE
.PP
\fBs2s_tls_compression\fR: \fItrue | false\fR
Expand Down
2 changes: 1 addition & 1 deletion src/ejabberd_option.erl
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ cache_size() ->
cache_size(Host) ->
ejabberd_config:get_option({cache_size, Host}).

-spec captcha_cmd() -> 'undefined' | binary().
-spec captcha_cmd() -> any().
captcha_cmd() ->
ejabberd_config:get_option({captcha_cmd, global}).

Expand Down
1 change: 1 addition & 0 deletions src/ejabberd_options_doc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ doc() ->
]}},
{captcha_cmd,
#{value => ?T("Path"),
note => "improved in 21.10",
desc =>
?T("Full path to a script that generates http://../basic/#captcha[CAPTCHA] images. "
"@VERSION@ is replaced with ejabberd version number in XX.YY format. "
Expand Down

0 comments on commit 2ef71a6

Please sign in to comment.