X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1f880528bd834bd59465b51ea8eccfe9fbd1715a..bf9dd8f350ca1b54afb79dda79506d980ccb5738:/app/controllers/users_controller.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 345bae261..514b3f8ee 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -269,7 +269,7 @@ class UsersController < ApplicationController def logout @title = t "users.logout.title" - if params[:session] == session.id + if request.post? if session[:token] token = UserToken.find_by(:token => session[:token]) token&.destroy @@ -376,7 +376,7 @@ class UsersController < ApplicationController @user = User.find_by(:display_name => params[:display_name]) if @user && - (@user.visible? || (current_user&.administrator?)) + (@user.visible? || current_user&.administrator?) @title = @user.display_name else render_unknown_user params[:display_name]