Merge lp:~edwin-grubbs/launchpad/bug-421898-cross-site-timeline-graph into lp:launchpad

Proposed by Edwin Grubbs
Status: Merged
Approved by: Aaron Bentley
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~edwin-grubbs/launchpad/bug-421898-cross-site-timeline-graph
Merge into: lp:launchpad
Diff against target: 13 lines
1 file modified
lib/lp/registry/templates/object-timeline-graph.pt (+2/-2)
To merge this branch: bzr merge lp:~edwin-grubbs/launchpad/bug-421898-cross-site-timeline-graph
Reviewer Review Type Date Requested Status
Aaron Bentley (community) code Approve
Review via email: mp+12551@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Summary
-------

A user wanted to embed the timeline graph on their website. This was not working due to the timeline graph's javascript trying to access the parent of the iframe across domain names, which triggered a browser security error. This branch fixes the problem by changing resize_frame to default to an empty string instead of nothing, since that gets converted to "None", since that variable is usually a string matching the id of the iframe.

Tests
-----

./bin/lp-windmill test=lib/canonical/launchpad/windmill/tests/test_registry/test_timeline_graph.py firefox http://launchpad.dev:8085

Demo and Q/A
------------

Demo:
* Start up launchpad.dev
  * Open http://launchpadlibrarian.net/32631714/test_iframe.html
  * You should see the timeline graph, even though the iframe is on the launchpadlibrarian.net domain.

QA:
* Open http://launchpadlibrarian.net/32632477/test_edge_iframe.html
  * You should see the timeline graph, even though the iframe is on the launchpadlibrarian.net domain.

Revision history for this message
Aaron Bentley (abentley) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/templates/object-timeline-graph.pt'
2--- lib/lp/registry/templates/object-timeline-graph.pt 2009-07-17 17:59:07 +0000
3+++ lib/lp/registry/templates/object-timeline-graph.pt 2009-09-28 21:05:25 +0000
4@@ -94,8 +94,8 @@
5 </script>
6 <script
7 tal:define="
8- include_inactive request/form/include_inactive | nothing;
9- resize_frame request/form/resize_frame | nothing"
10+ include_inactive request/form/include_inactive | string:false;
11+ resize_frame request/form/resize_frame | string:"
12 tal:content="
13 string: show_timeline_graph('${include_inactive}', '${resize_frame}');"/>
14