[open-ils-commits] [GIT] Evergreen ILS branch master updated. da9df53b242b2ed20662aa668f74290b3a0d86eb
Evergreen Git
git at git.evergreen-ils.org
Fri Nov 11 14:26:23 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via da9df53b242b2ed20662aa668f74290b3a0d86eb (commit)
from 3762864f03c2ed7ccec910d25f7b6b950a1ccdca (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit da9df53b242b2ed20662aa668f74290b3a0d86eb
Author: Jason Etheridge <jason at esilibrary.com>
Date: Thu Nov 10 12:55:32 2011 -0500
LP88653 force SSL for requests from local XUL
Modifies RemoteRequest.js to convert any http:// request URL to https:// if the
requesting location has a chrome:// protocol.
Modifies util/network.js such that any use of util.network.request (as opposed
to util.network.simple_request) will assume "secure" for the resulting request.
Adds an example to the bottom of eg_vhost.conf for forcing SSL for an entire
site (OPAC and everything), courtesy of Dan Wells.
Signed-off-by: Jason Etheridge <jason at esilibrary.com>
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
index fdcc0ff..cf593ed 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -625,3 +625,8 @@ RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
</IfModule>
</IfModule>
</Location>
+
+# Uncomment the following to force SSL for everything. Note that this defeats caching
+# and you will suffer a performance hit.
+#RewriteCond %{HTTPS} off
+#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
diff --git a/Open-ILS/web/opac/common/js/RemoteRequest.js b/Open-ILS/web/opac/common/js/RemoteRequest.js
index 125f57a..ae43f11 100644
--- a/Open-ILS/web/opac/common/js/RemoteRequest.js
+++ b/Open-ILS/web/opac/common/js/RemoteRequest.js
@@ -213,7 +213,7 @@ RemoteRequest.prototype.send = function(blocking) {
url = 'http://'+XML_HTTP_SERVER+'/'+XML_HTTP_GATEWAY;
if( url.match(/^http:/) &&
- (this.secure || location.href.match(/^https:/)) ) {
+ (this.secure || location.href.match(/^https:/) || location.href.match(/^chrome:/) ) ) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
url = url.replace(/^http:/, 'https:');
}
diff --git a/Open-ILS/xul/staff_client/chrome/content/util/network.js b/Open-ILS/xul/staff_client/chrome/content/util/network.js
index 931d174..fc2b5a6 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/network.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/network.js
@@ -81,7 +81,12 @@ util.network.prototype = {
//obj.error.sdump('D_SES','request '+ app + ' ' + name +' '+obj.error.pretty_print(sparams.slice(1,sparams.length-1))+
// '\noverride_params = ' + override_params + '\n_params = ' + _params + '\n');
- try {
+ try {
+
+ if (typeof _params == 'undefined') {
+ // If we're not using simple_request to get here, let's assume secure by default
+ _params = { 'secure' : true };
+ }
var request = this._request(app,name,params,f,override_params,_params);
if (request) {
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/examples/apache/eg_vhost.conf | 5 +++++
Open-ILS/web/opac/common/js/RemoteRequest.js | 2 +-
.../staff_client/chrome/content/util/network.js | 7 ++++++-
3 files changed, 12 insertions(+), 2 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list