[open-ils-commits] [GIT] Evergreen ILS branch rel_2_4 updated. 192a1f7b9c26e1ca038680200d51a7dc666d8a14

Evergreen Git git at git.evergreen-ils.org
Thu Feb 13 17:11:06 EST 2014


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_4 has been updated
       via  192a1f7b9c26e1ca038680200d51a7dc666d8a14 (commit)
      from  2614ebd16674124e064e512af419ba4e53795704 (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 192a1f7b9c26e1ca038680200d51a7dc666d8a14
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Fri Nov 9 16:12:58 2012 -0500

    Prevent odd TPAC base URL redirect
    
    As it stands, in a default install, if you browse to
    
    http://yourserver.com/eg/opac
    
    you are redirected to a login page, and if you login, you then get
    to the 404 page. This behavior is caused by the fact that *any*
    URLs which do not match a few select cases are assumed to be
    "secure" resources, when in fact they might not even exist.
    
    This commit catches any attempt to browse this 'base' and simply
    redirects to the "home" page instead.
    
    This addresses the most obvious and likely 404 of this type, but
    we might consider catching some other cases (e.g. eg/opac/record/).
    In addition (or as an alternative), we could also create a function
    call which simply checks the validity of a URL before we ask the
    user to login to see it.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 0838a29..111245c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -111,6 +111,11 @@ sub load {
 
     my $path = $self->apache->path_info;
 
+    if ($path =~ m|opac/?$|) {
+        # nowhere specified, just go home
+        return $self->generic_redirect($self->ctx->{home_page});
+    }
+
     (undef, $self->ctx->{mylist}) = $self->fetch_mylist unless
         $path =~ /opac\/my(opac\/lists|list)/;
 

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

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


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list