25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Add no-store hint to CAPTCHA challenge stanzas (#2730)

This commit is contained in:
Badlop 2018-12-21 15:32:23 +01:00
parent 34eed5064b
commit 1246a7a50f

View File

@ -105,12 +105,13 @@ create_captcha(SID, From, To, Lang, Limiter, Args) ->
"To unblock them, visit ~s">>, [JID, get_url(Id)]},
Body = xmpp:mk_text(BodyString, Lang),
OOB = #oob_x{url = get_url(Id)},
Hint = #hint{type = 'no-store'},
Tref = erlang:send_after(?CAPTCHA_LIFETIME, ?MODULE,
{remove_id, Id}),
ets:insert(captcha,
#captcha{id = Id, pid = self(), key = Key, tref = Tref,
args = Args}),
{ok, Id, Body, [OOB, Captcha, Data]};
{ok, Id, Body, [Hint, OOB, Captcha, Data]};
Err -> Err
end.