mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 09:13:09 -06:00
Enforce LoginTypeApplicationService after all
This commit is contained in:
parent
ff04a962f1
commit
2db487cdd3
|
|
@ -502,7 +502,7 @@ func Register(
|
||||||
|
|
||||||
// Squash username to all lowercase letters
|
// Squash username to all lowercase letters
|
||||||
r.Username = strings.ToLower(r.Username)
|
r.Username = strings.ToLower(r.Username)
|
||||||
if r.Auth.Type == authtypes.LoginTypeApplicationService || accessTokenErr == nil {
|
if r.Auth.Type == authtypes.LoginTypeApplicationService {
|
||||||
if resErr = validateApplicationServiceUsername(r.Username); resErr != nil {
|
if resErr = validateApplicationServiceUsername(r.Username); resErr != nil {
|
||||||
return *resErr
|
return *resErr
|
||||||
}
|
}
|
||||||
|
|
@ -604,7 +604,7 @@ func handleRegistrationFlow(
|
||||||
// registration or user exclusivity. We'll go onto the appservice
|
// registration or user exclusivity. We'll go onto the appservice
|
||||||
// registration flow if a valid access token was provided or if
|
// registration flow if a valid access token was provided or if
|
||||||
// the login type specifically requests it.
|
// the login type specifically requests it.
|
||||||
if r.Auth.Type == authtypes.LoginTypeApplicationService || accessTokenErr == nil {
|
if r.Auth.Type == authtypes.LoginTypeApplicationService {
|
||||||
return handleApplicationServiceRegistration(
|
return handleApplicationServiceRegistration(
|
||||||
accessToken, accessTokenErr, req, r, cfg, userAPI,
|
accessToken, accessTokenErr, req, r, cfg, userAPI,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue