mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
SECURITY: Limit passwords to 200 characters
Prevents layer 8 attack.
This commit is contained in:
@ -54,6 +54,8 @@ class SessionController < ApplicationController
|
||||
params.require(:login)
|
||||
params.require(:password)
|
||||
|
||||
return invalid_credentials if params[:password].length > User.max_password_length
|
||||
|
||||
login = params[:login].strip
|
||||
login = login[1..-1] if login[0] == "@"
|
||||
|
||||
|
Reference in New Issue
Block a user