browser_window: handle 'back to safety' cleanly

In order to ensure we actually go back to safety, clear the
curent loading parameters, and transfer the load parameters
for where we're going into them to be closer to a real navigate,
otherwise we end up copying the wrong loading parameters over
the top when we complete the back-to-safety navigation.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2019-08-14 19:31:45 +01:00
parent 5cd45cf7f0
commit c903c881e6

View File

@ -873,7 +873,11 @@ browser_window__handle_ssl_query_response(bool proceed, void *pw)
bw->current_parameters.flags &= ~BW_NAVIGATE_HISTORY;
bw->internal_nav = false;
return browser_window__navigate_internal(bw, &bw->current_parameters);
browser_window__free_fetch_parameters(&bw->loading_parameters);
memcpy(&bw->loading_parameters, &bw->current_parameters, sizeof(bw->loading_parameters));
memset(&bw->current_parameters, 0, sizeof(bw->current_parameters));
return browser_window__navigate_internal(bw, &bw->loading_parameters);
}
/* We're processing a "proceed" attempt from the form */