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:
Krzysztof Kotlarek
2020-10-02 09:01:40 +10:00
committed by GitHub
parent 29f7e0689f
commit 5cf411c3ae
11 changed files with 32 additions and 35 deletions

View File

@ -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)