diff options
author | corvid <devnull@localhost> | 2015-07-03 03:17:00 +0000 |
---|---|---|
committer | corvid <devnull@localhost> | 2015-07-03 03:17:00 +0000 |
commit | c01382e433921a27a42c8a618001fb38b6483369 (patch) | |
tree | 996ea3e0781518cff0b22c5d39d7538056106765 /src | |
parent | e27d90783f2296c7067686a96751b84f9aa92645 (diff) |
pop up dialog when an HTTPS page's form submission is insecure
Diffstat (limited to 'src')
-rw-r--r-- | src/form.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/form.cc b/src/form.cc index 92ee3a42..8c966ff2 100644 --- a/src/form.cc +++ b/src/form.cc @@ -23,6 +23,7 @@ #include "msg.h" #include "prefs.h" #include "uicmd.hh" +#include "dialog.hh" using namespace lout; using namespace dw; @@ -1037,6 +1038,16 @@ void DilloHtmlForm::eventHandler(Resource *resource, EventButton *event) */ void DilloHtmlForm::submit(DilloHtmlInput *active_input, EventButton *event) { + if (!dStrAsciiCasecmp(URL_SCHEME(html->page_url), "https") && + dStrAsciiCasecmp(URL_SCHEME(action), "https")) { + int choice = a_Dialog_choice("Dillo: Insecure form submission", + "A form on a SECURE page wants to use an " + "INSECURE protocol to submit data.", + "Continue", "Cancel", NULL); + if (choice != 1) + return; + } + DilloUrl *url = buildQueryUrl(active_input); if (url) { if (event && event->button == 2) { |