X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/783b5e3729228908d7404ae7404af1023501a906..438fb5074ed96d5bc6f54a86b147e5d92137b065:/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]