<commit_before>class Users::PasswordsController < Devise::PasswordsController

  layout "one_column_simple"

  def edit
    # Copied from Devise::PasswordsController
    self.resource = resource_class.new
    resource.reset_password_token = params[:reset_password_token]
    # end of copy

    @user = User.where(reset_password_token: params[:reset_password_token]).first

    if params[:msg]
      if @user
        sign_in @user, bypass: true
        redirect_to after_sign_in_path_for(@user)
      else
        redirect_to new_user_session_path,
          notice: 'Your account is already set up. Please log in to continue.'
      end
    else
      render :edit
    end
  end

end<commit_msg>Make brakeman happy<commit_after>class Users::PasswordsController < Devise::PasswordsController

  layout "one_column_simple"

  def edit
    # Copied from Devise::PasswordsController
    self.resource = resource_class.new
    resource.reset_password_token = params[:reset_password_token]
    # end of copy

    @user = User.where(reset_password_token: params[:reset_password_token].to_s).first

    if params[:msg]
      if @user
        sign_in @user, bypass: true
        redirect_to after_sign_in_path_for(@user).to_s
      else
        redirect_to new_user_session_path,
          notice: 'Your account is already set up. Please log in to continue.'
      end
    else
      render :edit
    end
  end

end
{'fraction_non_alphanumeric': 0.07112375533428165, 'fraction_numerical': 0.0, 'mean_word_length': 3.2, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3220249', 'n_tokens_mistral': 422, 'n_tokens_neox': 411, 'n_words': 105}