From 8fece5ebba4f496eed10c0c7844f3482b4f636d8 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 22 Sep 2008 08:13:45 +0000 Subject: [PATCH] test SSL cert before login (this will catch the folks who Cancel such dialogs), and with xulrunner 1.9, offer the stricter SSL exception dialog that Firefox 3 introduced git-svn-id: svn://svn.open-ils.org/ILS/trunk@10676 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 1 + .../staff_client/chrome/content/auth/controller.js | 31 ++++++++++++++++++++++ .../xul/staff_client/chrome/content/main/main.xul | 6 ++++- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 10018c8ba1..d7eb188364 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -550,6 +550,7 @@ + diff --git a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js index f49f3c1e53..42ab9245dd 100644 --- a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js +++ b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js @@ -84,6 +84,37 @@ auth.controller.prototype = { obj.test_server( obj.controller.view.server_prompt.value ); } ], + 'ssl_exception' : [ + ['render'], + function(e) { + return function() { + try { + obj.controller.view.cmd_ssl_exception.setAttribute('hidden','true'); + var x = new XMLHttpRequest(); + x.open("GET",'chrome://pippki/content/exceptionDialog.xul',false); + x.send(null); + obj.controller.view.cmd_ssl_exception.setAttribute('hidden','false'); + } catch(E) { + obj.controller.view.cmd_ssl_exception.setAttribute('hidden','true'); + } + }; + } + ], + 'cmd_ssl_exception' : [ + ['command'], + function() { + window.openDialog( + 'chrome://pippki/content/exceptionDialog.xul', + '', + 'chrome,centerscreen,modal', + { + 'location' : 'https://' + obj.controller.view.server_prompt.value, + 'prefetchCert' : true + } + ); + obj.test_server( obj.controller.view.server_prompt.value ); + } + ], 'server_prompt' : [ ['keypress'], handle_keypress diff --git a/Open-ILS/xul/staff_client/chrome/content/main/main.xul b/Open-ILS/xul/staff_client/chrome/content/main/main.xul index de6297e9b8..4f20549fb1 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/main.xul +++ b/Open-ILS/xul/staff_client/chrome/content/main/main.xul @@ -69,6 +69,7 @@ +