From 810bbc10962081725f01e1e10f524d0512e90707 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Thu, 9 May 2013 21:09:05 -0700 Subject: [PATCH] Don't use referrer as a fallback in VDestination. Since the referrer is not included in cache keys for pagecache or Akamai, this can result in weird stuff getting cached and causing downstream users to get redirected after login/registration to unexpected destinations. --- r2/r2/lib/validator/validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/lib/validator/validator.py b/r2/r2/lib/validator/validator.py index ac5e3c733..7919069ae 100644 --- a/r2/r2/lib/validator/validator.py +++ b/r2/r2/lib/validator/validator.py @@ -1795,7 +1795,7 @@ class VDestination(Validator): def run(self, dest): if not dest: - dest = request.referer or self.default or "/" + dest = self.default or "/" ld = dest.lower() if ld.startswith(('/', 'http://', 'http://')):