[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. cc90dc82cec13df46ba828b1e2727add17d28505
Evergreen Git
git at git.evergreen-ils.org
Fri Nov 11 14:42:39 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, rel_2_0 has been updated
via cc90dc82cec13df46ba828b1e2727add17d28505 (commit)
from c6083dba8878db023afa556d2bdd937f951cc452 (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 cc90dc82cec13df46ba828b1e2727add17d28505
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 e8c6fd8..690d5b2 100644
--- a/Open-ILS/examples/apache/eg_vhost.conf
+++ b/Open-ILS/examples/apache/eg_vhost.conf
@@ -578,3 +578,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 5871323..dfd85de 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/network.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/network.js
@@ -74,7 +74,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