From 53ca51654dbcd0419693ea21a6e64b3b9f310828 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 22 Apr 2015 12:41:28 -0400 Subject: [PATCH] FIX: Avoid cookie overflows by truncating the referer we store in flash --- app/controllers/topics_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index d226f6f1c8f..8e4f1c12cd8 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -40,7 +40,9 @@ class TopicsController < ApplicationController end def show - flash["referer"] ||= request.referer + if request.referer + flash["referer"] ||= request.referer[0..255] + end # We'd like to migrate the wordpress feed to another url. This keeps up backwards compatibility with # existing installs.