Bug 765: Bypass checks on base tab's view state when copying to a new tab
commitf4a231cb9acdd480c64cf79a1a1f168e54db8e9e
authorMiciah Dashiel Butler Masters <miciah.masters@gmail.com>
Wed, 11 Jun 2008 10:32:02 +0000 (11 10:32 +0000)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Wed, 27 May 2009 19:05:22 +0000 (27 22:05 +0300)
tree7594df2e4b4f6016fcb16bd3fec7b152320d0a74
parentb6aca8d9a74c4d03782181301835243c8cd6056f
Bug 765: Bypass checks on base tab's view state when copying to a new tab

In setup_session, use copy_location, add_to_history, and
render_document_frames instead of goto_uri and copy_vs to copy the base
tab's view state.  By avoiding goto_uri, setup_session now bypasses MIME
checks, form post confirmations, malicious URL checks, and so on when
copying the base tab's current location and view state to the new tab,
so the new tab should get exactly what was loaded in the base tab.

This fixes bug 765: Opening a new tab can ask about the document of the
previous tab.

(cherry picked from commit 5c96d430c98d7b67cf397aac83cfdfa1788aa6df)

Conflicts:

src/session/session.c:
Both elinks-0.12 and master had the ses->doc_view->vs
= vs assignment, but only elinks-0.12 had vs->doc_view
= ses->doc_view as well.  Also, struct connection_state
had been added after the original patch.
src/session/session.c