Commit 87a8b05a authored by o@immerda.ch's avatar o@immerda.ch
Browse files

fix log msg and remember fails longer

parent fdf40df8
......@@ -147,8 +147,8 @@ class SessionsController < ApplicationController
def login_failed
flash[:notice] = :login_failed
client_fails = Rails.cache.read(client_auth_key) || 0
logger.error "Auth failed. This client has now #{client_fails} failed logins"
Rails.cache.write(client_auth_key, client_fails+1, expires_in: 10.minutes)
logger.error "Auth failed. This client has now #{client_fails+1} failed logins"
Rails.cache.write(client_auth_key, client_fails+1, expires_in: 60.minutes)
load_params
load_pow(false)
render 'new'
......
Supports Markdown
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