<commit_before>class Clearance::SessionsController < ApplicationController
  unloadable

  protect_from_forgery :except => :create
  filter_parameter_logging :password

  def new
    render :template => 'sessions/new'
  end

  def create
    @user = ::User.authenticate(params[:session][:email],
                              params[:session][:password])
    if @user.nil?
      flash.now[:failure] = "Bad email or password."
      render :template => 'sessions/new', :status => :unauthorized
    else
      if @user.email_confirmed?
        sign_user_in(@user)
        remember(@user) if remember?
        flash[:success] = translate(:signed_in, :default =>  "Signed in.")
        redirect_back_or url_after_create
      else<commit_msg>added missing bad email or password translation in sessions controller<commit_after>class Clearance::SessionsController < ApplicationController
  unloadable

  protect_from_forgery :except => :create
  filter_parameter_logging :password

  def new
    render :template => 'sessions/new'
  end

  def create
    @user = ::User.authenticate(params[:session][:email],
                              params[:session][:password])
    if @user.nil?
      flash.now[:failure] = translate(:bad_email_or_password,
        :scope   => [:clearance, :controllers, :sessions],
        :default => "Bad email or password.")
      render :template => 'sessions/new', :status => :unauthorized
    else
      if @user.email_confirmed?
        sign_user_in(@user)
        remember(@user) if remember?
        flash[:success] = translate(:signed_in, :default =>  "Signed in.")
        redirect_back_or url_after_create
      else
{'fraction_non_alphanumeric': 0.11171827565270188, 'fraction_numerical': 0.0, 'mean_word_length': 3.14070351758794, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '6533393', 'n_tokens_mistral': 466, 'n_tokens_neox': 455, 'n_words': 108}