[open-ils-commits] [GIT] Evergreen ILS branch master updated. 51a4f25915899e592d876c8de08fe5d3751484e4
Evergreen Git
git at git.evergreen-ils.org
Thu Feb 13 17:10:27 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, master has been updated
via 51a4f25915899e592d876c8de08fe5d3751484e4 (commit)
from fbb73c7bcbcb32ec20ca828d1ba4154e045a762e (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 51a4f25915899e592d876c8de08fe5d3751484e4
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 e5ceb0f..7fe805b 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -114,6 +114,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