Explorar el Código

Escape mautrix-meta username prefix in registration regexes

The user-namespace regexes in the mautrix-meta-messenger and
mautrix-meta-instagram registration templates interpolated
the bridge username prefix without regex-escaping it, unlike the
neighboring homeserver domain and appservice username values. The
default prefixes are regex-safe, but a customized prefix containing
regex metacharacters would produce a wrong (too broad or invalid)
appservice user namespace.

Related to the registration regex discussion in #5096.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
create-pull-request/i18n
Slavi Pantaleev hace 15 horas
padre
commit
2d436491c6
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. +1
    -1
      roles/custom/matrix-bridge-mautrix-meta-instagram/defaults/main.yml
  2. +1
    -1
      roles/custom/matrix-bridge-mautrix-meta-messenger/defaults/main.yml

+ 1
- 1
roles/custom/matrix-bridge-mautrix-meta-instagram/defaults/main.yml Ver fichero

@@ -316,7 +316,7 @@ matrix_mautrix_meta_instagram_registration_yaml: |
namespaces:
users:
- exclusive: true
regex: '^@{{ matrix_mautrix_meta_instagram_bridge_username_prefix }}.+:{{ matrix_mautrix_meta_instagram_homeserver_domain | regex_escape }}$'
regex: '^@{{ matrix_mautrix_meta_instagram_bridge_username_prefix | regex_escape }}.+:{{ matrix_mautrix_meta_instagram_homeserver_domain | regex_escape }}$'
- exclusive: true
regex: '^@{{ matrix_mautrix_meta_instagram_appservice_username | regex_escape }}:{{ matrix_mautrix_meta_instagram_homeserver_domain | regex_escape }}$'
url: {{ matrix_mautrix_meta_instagram_appservice_address }}


+ 1
- 1
roles/custom/matrix-bridge-mautrix-meta-messenger/defaults/main.yml Ver fichero

@@ -316,7 +316,7 @@ matrix_mautrix_meta_messenger_registration_yaml: |
namespaces:
users:
- exclusive: true
regex: '^@{{ matrix_mautrix_meta_messenger_bridge_username_prefix }}.+:{{ matrix_mautrix_meta_messenger_homeserver_domain | regex_escape }}$'
regex: '^@{{ matrix_mautrix_meta_messenger_bridge_username_prefix | regex_escape }}.+:{{ matrix_mautrix_meta_messenger_homeserver_domain | regex_escape }}$'
- exclusive: true
regex: '^@{{ matrix_mautrix_meta_messenger_appservice_username | regex_escape }}:{{ matrix_mautrix_meta_messenger_homeserver_domain | regex_escape }}$'
url: {{ matrix_mautrix_meta_messenger_appservice_address }}


Cargando…
Cancelar
Guardar