Skip to content
Snippets Groups Projects
Commit dd8a6ede authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

dont allow guest registration if registration disabled with token configured

parent 6664259e
No related branches found
No related tags found
No related merge requests found
......@@ -89,9 +89,10 @@ pub async fn register_route(body: Ruma<register::v3::Request>) -> Result<registe
if is_guest
&& (!services().globals.allow_guest_registration()
|| !services().globals.allow_registration())
|| (!services().globals.allow_registration()
&& services().globals.config.registration_token.is_some()))
{
info!("Guest registration disabled / registration fully disabled, rejecting guest registration, initial device name: {:?}", body.initial_device_display_name);
info!("Guest registration disabled / registration disabled with token configured, rejecting guest registration, initial device name: {:?}", body.initial_device_display_name);
return Err(Error::BadRequest(
ErrorKind::GuestAccessForbidden,
"Guest registration is disabled.",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment