FIX: Avoid cookie overflows by truncating the referer we store in flash

This commit is contained in:
Robin Ward 2015-04-22 12:41:28 -04:00
parent 85320f919b
commit 53ca51654d

View File

@ -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.