]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/users_controller.rb
Merge remote-tracking branch 'upstream/pull/2521'
[rails.git] / app / controllers / users_controller.rb
index a61a10d94f5c098606a3dffd7d59e5854fc61a88..514b3f8ee73f41d8d2284886ac11c1dde1addf47 100644 (file)
@@ -269,7 +269,7 @@ class UsersController < ApplicationController
   def logout
     @title = t "users.logout.title"
 
   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
       if session[:token]
         token = UserToken.find_by(:token => session[:token])
         token&.destroy