From 24d1105d28fcaf9f37a972568b41d67d16c35b4c Mon Sep 17 00:00:00 2001 From: YLong Shi Date: Wed, 24 Jul 2024 10:33:54 +0800 Subject: [PATCH 1/4] Update config_documentation.md change the example configuration of msisdn in `allowed_local_3pids`, which is a bit misleading that regex pattern has leading '+' --- docs/usage/configuration/config_documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index 649f4f71c7..86a33ddb68 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -2420,7 +2420,7 @@ allowed_local_3pids: - medium: email pattern: '^[^@]+@vector\.im$' - medium: msisdn - pattern: '\+44' + pattern: '^44\d{10}$' ``` --- ### `enable_3pid_lookup` From ef6fb6b180f06ede86db17563203aa36c42ba482 Mon Sep 17 00:00:00 2001 From: YLong Shi Date: Wed, 24 Jul 2024 10:44:10 +0800 Subject: [PATCH 2/4] Create changelog --- changelog.d/17476.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/17476.doc diff --git a/changelog.d/17476.doc b/changelog.d/17476.doc new file mode 100644 index 0000000000..d0aeede7fb --- /dev/null +++ b/changelog.d/17476.doc @@ -0,0 +1 @@ +Change the example configuration of msisdn in allowed_local_3pids, which is a bit misleading that regex pattern has leading '+'. From 4e66cff68fd570f4dc0c85f760a08219b03b8694 Mon Sep 17 00:00:00 2001 From: YLong Shi Date: Thu, 25 Jul 2024 09:20:12 +0800 Subject: [PATCH 3/4] link 3pid spec to config doc --- docs/usage/configuration/config_documentation.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index 86a33ddb68..22587210ef 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -2386,7 +2386,7 @@ enable_registration_without_verification: true --- ### `registrations_require_3pid` -If this is set, users must provide all of the specified types of 3PID when registering an account. +If this is set, users must provide all of the specified types of [3PID](https://spec.matrix.org/latest/appendices/#3pid-types) when registering an account. Note that [`enable_registration`](#enable_registration) must also be set to allow account registration. @@ -2412,6 +2412,8 @@ disable_msisdn_registration: true Mandate that users are only allowed to associate certain formats of 3PIDs with accounts on this server, as specified by the `medium` and `pattern` sub-options. +You can get more information about 3PID and the expected types of `medium` [here](https://spec.matrix.org/latest/appendices/#3pid-types). + Example configuration: ```yaml allowed_local_3pids: From cdb928947d2e0d910702726cdb982fe05b871924 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Thu, 25 Jul 2024 11:58:36 +0100 Subject: [PATCH 4/4] small wording changes, document `pattern` syntax --- changelog.d/17476.doc | 2 +- docs/usage/configuration/config_documentation.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.d/17476.doc b/changelog.d/17476.doc index d0aeede7fb..89d8d490bb 100644 --- a/changelog.d/17476.doc +++ b/changelog.d/17476.doc @@ -1 +1 @@ -Change the example configuration of msisdn in allowed_local_3pids, which is a bit misleading that regex pattern has leading '+'. +Update the [`allowed_local_3pids`](https://element-hq.github.io/synapse/v1.112/usage/configuration/config_documentation.html#allowed_local_3pids) config option's msisdn address to a working example. diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md index 22587210ef..40f64be856 100644 --- a/docs/usage/configuration/config_documentation.md +++ b/docs/usage/configuration/config_documentation.md @@ -2411,8 +2411,9 @@ disable_msisdn_registration: true Mandate that users are only allowed to associate certain formats of 3PIDs with accounts on this server, as specified by the `medium` and `pattern` sub-options. +`pattern` is a [Perl-like regular expression](https://docs.python.org/3/library/re.html#module-re). -You can get more information about 3PID and the expected types of `medium` [here](https://spec.matrix.org/latest/appendices/#3pid-types). +More information about 3PIDs, allowed `medium` types and their `address` syntax can be found [in the Matrix spec](https://spec.matrix.org/latest/appendices/#3pid-types). Example configuration: ```yaml