From: erickson Date: Mon, 14 Aug 2006 21:16:25 +0000 (+0000) Subject: made secure logic smarter X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f020e75660ba3746f594e54c9ee78e412342c2ef;p=Evergreen.git made secure logic smarter git-svn-id: svn://svn.open-ils.org/ILS/trunk@5503 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/common/js/RemoteRequest.js b/Open-ILS/web/opac/common/js/RemoteRequest.js index ee5a869da0..e9d4b2580f 100644 --- a/Open-ILS/web/opac/common/js/RemoteRequest.js +++ b/Open-ILS/web/opac/common/js/RemoteRequest.js @@ -222,11 +222,14 @@ RemoteRequest.prototype.send = function(blocking) { var url = location.protocol + "//" + location.host + "/" + XML_HTTP_GATEWAY; if(isXUL()) { - netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); if( XML_HTTP_SERVER ) url = 'http://'+XML_HTTP_SERVER+'/'+XML_HTTP_GATEWAY; - if( this.secure ) url = url.replace(/http:/, 'https:'); - else url = url.replace(/https/, 'http'); + + if( url.match(/^http:/) && + (this.secure || location.href.match(/^https:/)) ) { + netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); + url = url.replace(/^http:/, 'https:'); + } } var data = null;