[open-ils-commits] [GIT] Evergreen ILS branch master updated. 7d4598a3874536c365934f6f3e9745636415d642

Evergreen Git git at git.evergreen-ils.org
Tue Nov 15 11:30:51 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  7d4598a3874536c365934f6f3e9745636415d642 (commit)
      from  8f2a17b6fa2978a867ba7178b0fbc196a968fd7b (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 7d4598a3874536c365934f6f3e9745636415d642
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Nov 14 16:27:05 2011 -0500

    tpac; improve ssl and authentication redirection
    
    Create a better separation between pages the require SSL and those
    that also require authentication.  This change has a number of
    beneficial side effects:
    
    1. If a user is already logged in and is somehow redirected to the
    non-SSL version of a page requiring SSL (via, for example, some external
    link), they are simply taken to the SSL equivlent of the page first.  If
    they are found to be logged in, we're done.  If not, they are directed to
    the login page like usual.
    
    2. password_reset page now requires SSL (but not auth, obviously)
    
    3. Removed the unnecessary warning about logging out on a non-SSL
    connection.  We now redirect the user to the SSL version of logout so,
    if they are in fact logged in, they can be successfully logged out.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index e934a39..3c10db7 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -108,10 +108,13 @@ sub load {
     return $self->load_cache_clear if $path =~ m|opac/cache/clear|;
 
     # ----------------------------------------------------------------
-    # Logout and login require SSL
+    #  Everything below here requires SSL
     # ----------------------------------------------------------------
+    return $self->redirect_ssl unless $self->cgi->https;
+    return $self->load_password_reset if $path =~ m|opac/password_reset|;
+    return $self->load_logout if $path =~ m|opac/logout|;
+
     if($path =~ m|opac/login|) {
-        return $self->redirect_ssl unless $self->cgi->https;
         return $self->load_login unless $self->editor->requestor; # already logged in?
 
         # This will be less confusing to users than to be shown a login form
@@ -124,20 +127,10 @@ sub load {
         );
     }
 
-    if($path =~ m|opac/logout|) {
-        #return Apache2::Const::FORBIDDEN unless $self->cgi->https; 
-        $self->apache->log->warn("catloader: logout called in non-secure context from " . 
-            ($self->ctx->{referer} || '<no referer>')) unless $self->cgi->https;
-        return $self->load_logout;
-    }
-
-    return $self->load_password_reset if $path =~ m|opac/password_reset|;
-
     # ----------------------------------------------------------------
-    #  Everything below here requires SSL + authentication
+    #  Everything below here requires authentication
     # ----------------------------------------------------------------
-    return $self->redirect_auth
-        unless $self->cgi->https and $self->editor->requestor;
+    return $self->redirect_auth unless $self->editor->requestor;
 
     return $self->load_place_hold if $path =~ m|opac/place_hold|;
     return $self->load_myopac_holds if $path =~ m|opac/myopac/holds|;

-----------------------------------------------------------------------

Summary of changes:
 .../src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm    |   21 ++++++-------------
 1 files changed, 7 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list