Commit 4f8533a9 authored by o's avatar o
Browse files

enable accidentially disabled security level

parent 83d7ee6b
......@@ -6,6 +6,10 @@ class LoginController < ApplicationController
CountIpFails = false
def login
unless session[:properly_initialized]
return new_login_session
end
load_params
load_news_frame
......@@ -90,21 +94,21 @@ class LoginController < ApplicationController
end
def new
load_news_frame
flash[:notice] = nil
load_params_new
new_login_session
end
private
def new_login_session
load_news_frame
f = flash[:notice]
fails = session[:auth_failures] || 0
reset_user_session
params.delete(:user_id)
session[:auth_failures] = fails
flash[:notice] = f
load_params_new
load_pow(true)
session[:properly_initialized] = true
render 'new'
end
......@@ -149,7 +153,6 @@ class LoginController < ApplicationController
# do we want an additional captcha
enable_captcha: captcha
}
{redirects: 0, wait: 0, pow_factor: 1, enable_captcha: false}
end
......@@ -205,6 +208,7 @@ class LoginController < ApplicationController
if session[:pre_auth_id] != @input_user_id
@input_user_id = nil
return
end
@input_pw = params[:password]
......@@ -217,7 +221,7 @@ class LoginController < ApplicationController
@input_totp = params[:totp]
end
session[:pre_auth] ||= ApiBackend::pre_auth(@input_user_id)
session[:pre_auth] ||= ApiBackend::pre_auth(@input_user_id)
load_custom_params
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment