fix-2fa-argument-error.patch

Go MAEDA, 2020-08-30 09:20

Download (1.26 KB)

View differences:

lib/redmine/twofa/base.rb
53 53
      end
54 54

  
55 55
      def deliver_twofa_paired
56
        Mailer.security_notification(
56
        ::Mailer.security_notification(
57 57
          @user,
58 58
          User.current,
59 59
          {
......
82 82
      end
83 83

  
84 84
      def deliver_twofa_unpaired
85
        Mailer.security_notification(
85
        ::Mailer.security_notification(
86 86
          @user,
87 87
          User.current,
88 88
          {
......
114 114
        Token.where(user_id: @user.id).find_token('twofa_backup_code', code).try(:delete)
115 115
        # make sure the user using the backup code is the same it's been issued to
116 116
        return false unless @user.present? && @user == user_from_code
117
        Mailer.security_notification(
117
        ::Mailer.security_notification(
118 118
          @user,
119 119
          User.current,
120 120
          {
......
135 135
          token.update_columns value: Redmine::Utils.random_hex(6)
136 136
          tokens << token
137 137
        end
138
        Mailer.security_notification(
138
        ::Mailer.security_notification(
139 139
          @user,
140 140
          User.current,
141 141
          {