From: phasefx Date: Mon, 22 Sep 2008 08:13:56 +0000 (+0000) Subject: test SSL cert before login (this will catch the folks who Cancel such dialogs), and... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9b7aebfc2480598b93dfa410db4d93bca25ba0c9;p=Evergreen.git 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/branches/rel_1_2@10677 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 482c98ec54..43966e1cdc 100644 --- a/Open-ILS/xul/staff_client/chrome/content/auth/controller.js +++ b/Open-ILS/xul/staff_client/chrome/content/auth/controller.js @@ -83,6 +83,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 @@ -222,7 +253,7 @@ auth.controller.prototype = { return; } try { - if ( ! url.match(/^http:\/\//) ) url = 'http://' + url; + if ( ! url.match(/^https:\/\//) ) url = 'https://' + url; var x = new XMLHttpRequest(); dump('server url = ' + url + '\n'); x.open("GET",url,true); 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 f3fc59d506..0ece48a7dd 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/main.xul +++ b/Open-ILS/xul/staff_client/chrome/content/main/main.xul @@ -67,6 +67,7 @@ +