mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-30 20:37:36 +00:00
1 parent
b0a829971d
commit
0af4c49657
2 files changed
+16
No files matched your search
@@ -0,0 +1 @@
|
||||
SEC48 fix. See <https://forgejo.ellis.link/continuwuation/advisories> at a later date for more info. Contributed by @jade.
|
||||
@@ -329,6 +329,21 @@ async fn begin_registration(
|
||||
let open_registration = services.config.enable_challengeless_registration();
|
||||
let mut errors = ValidationErrors::new();
|
||||
|
||||
// The flow is chosen by the client, so make sure it's one we actually offer
|
||||
let flow_status = services.uiaa.registration_flow_status().await;
|
||||
let flow_available = match form.flow {
|
||||
| RequestedRegistrationFlow::Trusted =>
|
||||
matches!(flow_status.trusted, TrustedFlowStatus::Available),
|
||||
| RequestedRegistrationFlow::Untrusted =>
|
||||
matches!(flow_status.untrusted, UntrustedFlowStatus::Available { .. }),
|
||||
};
|
||||
|
||||
if !flow_available {
|
||||
return Err(WebError::Forbidden(
|
||||
"This registration flow is not available on this server".to_owned(),
|
||||
));
|
||||
}
|
||||
|
||||
let user_id = match services
|
||||
.users
|
||||
.determine_registration_user_id(Some(form.username), form.email.as_ref(), None)
|
||||
|
||||
Reference in new issue
Block a user