Permalink
Browse files

fail2ban compatible auth warning (see http://code.google.com/p/ovz-we…

…b-panel/issues/detail?id=338)

(regex would be: ^Failed login for .* from <HOST> at .*$)
  • Loading branch information...
1 parent 52ef494 commit 6fbeb5b373a7a5a5adb16ce89361db007e8b6a89 Michel Käser committed Aug 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/sessions_controller.rb
@@ -38,7 +38,7 @@ def new
end
end
- logger.warn "Failed login for '#{params[:login]}' from #{request.remote_ip} at #{Time.now.utc}"
+ logger.warn "Failed login for '#{params[:login]}' from #{request.remote_ip} at #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}"
respond_to do |format|
format.html { render :json => { :success => false, :message => message } }
format.iphone { flash.now[:error] = message }

0 comments on commit 6fbeb5b

Please sign in to comment.