From 1faa75a126a106350042abf65745bc120f1f2d6a Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Mon, 21 May 2018 11:58:25 -0700 Subject: [PATCH] mod fix for cookies: set wbinfo.mod to replay_mod (mp_ or '') to avoid cookie issues caused by content loaded with wrong modifier (eg. with yt comments) (#330) --- pywb/apps/rewriterapp.py | 1 + pywb/templates/head_insert.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pywb/apps/rewriterapp.py b/pywb/apps/rewriterapp.py index cfa6e3e9..db1da528 100644 --- a/pywb/apps/rewriterapp.py +++ b/pywb/apps/rewriterapp.py @@ -348,6 +348,7 @@ class RewriterApp(object): top_url, environ, framed_replay, + replay_mod=self.replay_mod, config=self.config)) cookie_rewriter = None diff --git a/pywb/templates/head_insert.html b/pywb/templates/head_insert.html index 4ba5ef00..8c50c88e 100644 --- a/pywb/templates/head_insert.html +++ b/pywb/templates/head_insert.html @@ -18,7 +18,7 @@ wbinfo.timestamp = "{{ cdx.timestamp }}"; wbinfo.request_ts = "{{ wb_url.timestamp }}"; wbinfo.prefix = decodeURI("{{ wb_prefix }}"); - wbinfo.mod = "{{ wb_url.mod }}"; + wbinfo.mod = "{{ replay_mod }}"; wbinfo.is_framed = {{ is_framed }}; wbinfo.is_live = {{ is_live }}; wbinfo.coll = "{{ coll }}";