Mercurial > prosody-modules
annotate mod_register_web/README.markdown @ 4651:8231774f5bfd
mod_cloud_notify_encrypted: Ensure body substring remains valid UTF-8
The `body:sub()` call risks splitting the string in the middle of a
multi-byte UTF-8 sequence. This should have been caught by util.stanza
validation, but that would have caused some havoc, at the very least causing
the notification to not be sent.
There have been no reports of this happening. Likely because this module
isn't widely deployed among users with languages that use many longer UTF-8
sequences.
The util.encodings.utf8.valid() function is O(n) where only the last
sequence really needs to be checked, but it's in C and expected to be fast.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 22 Aug 2021 13:22:59 +0200 |
parents | 6ae1c7b9c58b |
children | b45c23ce24ba |
rev | line source |
---|---|
1803 | 1 --- |
2 labels: | |
3 - 'Stage-Alpha' | |
4 summary: A web interface to register user accounts | |
5 ... | |
6 | |
7 Introduction | |
8 ------------ | |
9 | |
10 There are various reasons to prefer web registration instead of | |
11 "in-band" account registration over XMPP. For example the lack of | |
12 CAPTCHA support in clients and servers. | |
13 | |
14 Details | |
15 ------- | |
16 | |
17 mod\_register\_web has Prosody serve a web page where users can sign up | |
4439
6ae1c7b9c58b
mod_register_web: Update reCAPTCHA URL
Michel Le Bihan <michel@lebihan.pl>
parents:
2783
diff
changeset
|
18 for an account. It implements reCAPTCHA to prevent automated sign-ups |
1803 | 19 (from bots, etc.). |
20 | |
21 Configuration | |
22 ------------- | |
23 | |
24 The module is served on Prosody's default HTTP ports at the path | |
25 `/register_web`. More details on configuring HTTP modules in Prosody can | |
26 be found in our [HTTP documentation](http://prosody.im/doc/http). | |
27 | |
28 To configure the CAPTCHA you need to supply a 'captcha\_options' option: | |
29 | |
30 captcha_options = { | |
31 recaptcha_private_key = "12345"; | |
32 recaptcha_public_key = "78901"; | |
33 } | |
34 | |
4439
6ae1c7b9c58b
mod_register_web: Update reCAPTCHA URL
Michel Le Bihan <michel@lebihan.pl>
parents:
2783
diff
changeset
|
35 The keys for reCAPTCHA are available in your reCAPTCHA account, visit |
6ae1c7b9c58b
mod_register_web: Update reCAPTCHA URL
Michel Le Bihan <michel@lebihan.pl>
parents:
2783
diff
changeset
|
36 [reCAPTCHA](https://developers.google.com/recaptcha/) for more info. |
1803 | 37 |
38 If no reCaptcha options are set, a simple built in captcha is used. | |
39 | |
2783
8d1634b71066
mod_register_web: Update README to explain customization
Matthew Wild <mwild1@gmail.com>
parents:
1803
diff
changeset
|
40 Customization |
8d1634b71066
mod_register_web: Update README to explain customization
Matthew Wild <mwild1@gmail.com>
parents:
1803
diff
changeset
|
41 ------------- |
8d1634b71066
mod_register_web: Update README to explain customization
Matthew Wild <mwild1@gmail.com>
parents:
1803
diff
changeset
|
42 |
8d1634b71066
mod_register_web: Update README to explain customization
Matthew Wild <mwild1@gmail.com>
parents:
1803
diff
changeset
|
43 Copy the files in mod_register_web/templates/ to a new directory. Edit them, |
8d1634b71066
mod_register_web: Update README to explain customization
Matthew Wild <mwild1@gmail.com>
parents:
1803
diff
changeset
|
44 and set `register_web_template = "/path/to/your/custom-templates"` in your |
8d1634b71066
mod_register_web: Update README to explain customization
Matthew Wild <mwild1@gmail.com>
parents:
1803
diff
changeset
|
45 config file. |
8d1634b71066
mod_register_web: Update README to explain customization
Matthew Wild <mwild1@gmail.com>
parents:
1803
diff
changeset
|
46 |
1803 | 47 Compatibility |
48 ------------- | |
49 | |
50 ----- -------------- | |
2783
8d1634b71066
mod_register_web: Update README to explain customization
Matthew Wild <mwild1@gmail.com>
parents:
1803
diff
changeset
|
51 0.10 Works |
1803 | 52 0.9 Works |
53 0.8 Doesn't work | |
54 ----- -------------- | |
55 | |
56 Todo | |
57 ---- | |
58 | |
59 Different CAPTCHA implementation support | |
60 | |
61 Collection of additional data, such as email address | |
62 | |
63 The module kept simple! |