<commit_before>class SessionsController < ApplicationController
  include SessionsHelper

  def new
  end

  def create
    if request.env['omniauth.auth'].present?
      omniauth_login
    elsif params[:session][:provider] == 'local'
      local_login
    else
      flash.now[:danger] = 'Incorrect login information'
      render 'new'
    end
  end<commit_msg>Reset session on creation (counter session fixation)<commit_after>class SessionsController < ApplicationController
  include SessionsHelper

  def new
  end

  def create
    reset_session # Counter session fixation
    if request.env['omniauth.auth'].present?
      omniauth_login
    elsif params[:session][:provider] == 'local'
      local_login
    else
      flash.now[:danger] = 'Incorrect login information'
      render 'new'
    end
  end
{'fraction_non_alphanumeric': 0.08024691358024691, 'fraction_numerical': 0.0, 'mean_word_length': 3.407608695652174, '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': '7644269', 'n_tokens_mistral': 235, 'n_tokens_neox': 216, 'n_words': 61}