[open-ils-commits] r10678 - in branches/rel_1_2_3/Open-ILS/xul/staff_client/chrome/content: auth main

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Sep 22 04:14:12 EDT 2008


Author: phasefx
Date: 2008-09-22 04:14:08 -0400 (Mon, 22 Sep 2008)
New Revision: 10678

Modified:
   branches/rel_1_2_3/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
   branches/rel_1_2_3/Open-ILS/xul/staff_client/chrome/content/main/main.xul
Log:
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

Modified: branches/rel_1_2_3/Open-ILS/xul/staff_client/chrome/content/auth/controller.js
===================================================================
--- branches/rel_1_2_3/Open-ILS/xul/staff_client/chrome/content/auth/controller.js	2008-09-22 08:13:56 UTC (rev 10677)
+++ branches/rel_1_2_3/Open-ILS/xul/staff_client/chrome/content/auth/controller.js	2008-09-22 08:14:08 UTC (rev 10678)
@@ -83,6 +83,37 @@
 							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 @@
 			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);

Modified: branches/rel_1_2_3/Open-ILS/xul/staff_client/chrome/content/main/main.xul
===================================================================
--- branches/rel_1_2_3/Open-ILS/xul/staff_client/chrome/content/main/main.xul	2008-09-22 08:13:56 UTC (rev 10677)
+++ branches/rel_1_2_3/Open-ILS/xul/staff_client/chrome/content/main/main.xul	2008-09-22 08:14:08 UTC (rev 10678)
@@ -67,6 +67,7 @@
 		<command id="cmd_js_console"/>
 		<command id="cmd_clear_cache"/>
 		<command id="cmd_test_server"/>
+		<command id="cmd_ssl_exception" hidden="true"/>
 	</commandset>
 
 	<keyset id="auth_keys">
@@ -102,7 +103,10 @@
 						<label value="Hostname" control="server_prompt" accesskey="H"/>
 						<vbox>
 							<textbox id="server_prompt"/>
-							<button label="Re-Test Server" id="retest" accesskey="R" command="cmd_test_server"/>
+                            <hbox>
+							    <button label="Re-Test Server" id="retest" accesskey="R" command="cmd_test_server"/>
+							    <button label="Add SSL Exception" id="ssl_exception" command="cmd_ssl_exception"/>
+                            </hbox>
 						</vbox>
 					</row>
 					<row>



More information about the open-ils-commits mailing list