Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `.prettierignore`: Upstream added a line at the end of the file, while glitch-soc had its own extra lines. Took upstream's change. - `CONTRIBUTING.md`: We have our custom CONTRIBUTING.md quoting upstream. Upstream made changes. Ported upstream changes. - `app/controllers/application_controller.rb`: Upstream made code style changes in a method that is entirely replaced in glitch-soc. Ignored the change. - `app/models/account.rb`: Code style changes textually close to glitch-soc-specific changes. Ported upstream changes. - `lib/sanitize_ext/sanitize_config.rb`: Upstream code style changes. Ignored them.
This commit is contained in:
@ -13,6 +13,7 @@ module SessionTrackingConcern
|
||||
|
||||
def set_session_activity
|
||||
return unless session_needs_update?
|
||||
|
||||
current_session.touch
|
||||
end
|
||||
|
||||
|
@ -165,6 +165,7 @@ module SignatureVerification
|
||||
end
|
||||
|
||||
raise SignatureVerificationError, "Invalid Digest value. The provided Digest value is not a SHA-256 digest. Given digest: #{sha256[1]}" if digest_size != 32
|
||||
|
||||
raise SignatureVerificationError, "Invalid Digest value. Computed SHA-256 digest: #{body_digest}; given: #{sha256[1]}"
|
||||
end
|
||||
|
||||
|
@ -57,10 +57,10 @@ module TwoFactorAuthenticationConcern
|
||||
|
||||
if valid_webauthn_credential?(user, webauthn_credential)
|
||||
on_authentication_success(user, :webauthn)
|
||||
render json: { redirect_path: after_sign_in_path_for(user) }, status: :ok
|
||||
render json: { redirect_path: after_sign_in_path_for(user) }, status: 200
|
||||
else
|
||||
on_authentication_failure(user, :webauthn, :invalid_credential)
|
||||
render json: { error: t('webauthn_credentials.invalid_credential') }, status: :unprocessable_entity
|
||||
render json: { error: t('webauthn_credentials.invalid_credential') }, status: 422
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user