Project

General

Profile

Defect #33925 » fix-2fa-argument-error.patch

Go MAEDA, 2020-08-30 09:20

View differences:

lib/redmine/twofa/base.rb
end
def deliver_twofa_paired
Mailer.security_notification(
::Mailer.security_notification(
@user,
User.current,
{
......
end
def deliver_twofa_unpaired
Mailer.security_notification(
::Mailer.security_notification(
@user,
User.current,
{
......
Token.where(user_id: @user.id).find_token('twofa_backup_code', code).try(:delete)
# make sure the user using the backup code is the same it's been issued to
return false unless @user.present? && @user == user_from_code
Mailer.security_notification(
::Mailer.security_notification(
@user,
User.current,
{
......
token.update_columns value: Redmine::Utils.random_hex(6)
tokens << token
end
Mailer.security_notification(
::Mailer.security_notification(
@user,
User.current,
{
(2-2/2)