mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
FIX: move hp request from /users to /token (#10795)
`hp` is a valid username and we should not prevent users from registering it.
This commit is contained in:

committed by
GitHub

parent
29f7e0689f
commit
5cf411c3ae
@ -451,6 +451,17 @@ class SessionController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def get_honeypot_value
|
||||
secure_session.set(HONEYPOT_KEY, honeypot_value, expires: 1.hour)
|
||||
secure_session.set(CHALLENGE_KEY, challenge_value, expires: 1.hour)
|
||||
|
||||
render json: {
|
||||
value: honeypot_value,
|
||||
challenge: challenge_value,
|
||||
expires_in: SecureSession.expiry
|
||||
}
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def check_local_login_allowed(user: nil, check_login_via_email: false)
|
||||
|
Reference in New Issue
Block a user