mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Validate email in oauth registration form (#15014)
This commit is contained in:
		@@ -942,6 +942,11 @@ func LinkAccountPostRegister(ctx *context.Context) {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if !form.IsEmailDomainAllowed() {
 | 
			
		||||
		ctx.RenderWithErr(ctx.Tr("auth.email_domain_blacklisted"), tplLinkAccount, &form)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if setting.Service.AllowOnlyExternalRegistration || !setting.Service.RequireExternalRegistrationPassword {
 | 
			
		||||
		// In models.User an empty password is classed as not set, so we set form.Password to empty.
 | 
			
		||||
		// Eventually the database should be changed to indicate "Second Factor"-enabled accounts
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user