Skip to content

A platform for community discussion. Free, open, simple.

FIX: Drop flash-based referer fallback in `topics#show` (#40901)

David Taylora83a0f54369e
diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb
index 4316a788c6c..4926364b4b7 100644
--- a/app/controllers/topics_controller.rb
+++ b/app/controllers/topics_controller.rb
@@ -60,8 +60,6 @@ class TopicsController < ApplicationController
raise Discourse::InvalidParameters.new("Show only accepts a single ID")
end
- flash["referer"] ||= request.referer[0..255] if request.referer
-
# TODO: We'd like to migrate the wordpress feed to another url. This keeps up backwards
# compatibility with existing installs.
return wordpress if params[:best].present?
@@ -1454,7 +1452,7 @@ class TopicsController < ApplicationController
if !request.format.json?
hash = {
- referer: request.referer || flash[:referer],
+ referer: request.referer,
host: request.host,
current_user: current_user,
topic_id: @topic_view.topic.id,