mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
SECURITY: Remove email validation check bypass
- Increase size of email column to varchar(513) - Give error message on signup when email is too large Overall impact: Low, allows signups from blocked domains. Main risk is increased spam.
This commit is contained in:
@ -232,6 +232,10 @@ class UsersController < ApplicationController
|
||||
return fail_with("login.password_too_long")
|
||||
end
|
||||
|
||||
if params[:email] && params[:email].length > 254 + 1 + 253
|
||||
return fail_with("login.email_too_long")
|
||||
end
|
||||
|
||||
if SiteSetting.reserved_usernames.split("|").include? params[:username].downcase
|
||||
return fail_with("login.reserved_username")
|
||||
end
|
||||
|
Reference in New Issue
Block a user