mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
Only perform login action on explicit POST (#25653).
Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@16554 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -34,12 +34,12 @@ class AccountController < ApplicationController
|
||||
|
||||
# Login request and validation
|
||||
def login
|
||||
if request.get?
|
||||
if request.post?
|
||||
authenticate_user
|
||||
else
|
||||
if User.current.logged?
|
||||
redirect_back_or_default home_url, :referer => true
|
||||
end
|
||||
else
|
||||
authenticate_user
|
||||
end
|
||||
rescue AuthSourceException => e
|
||||
logger.error "An error occurred when authenticating #{params[:username]}: #{e.message}"
|
||||
|
||||
Reference in New Issue
Block a user