[LON-CAPA-cvs] cvs: modules /raeburn monitor.pl
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 28 Aug 2007 18:43:09 -0000
raeburn Tue Aug 28 14:43:09 2007 EDT
Modified files:
/modules/raeburn monitor.pl
Log:
- Adding version number
- Update redirect check in SSO login as AIS changed behavior in Sentinel v.3.0
Index: modules/raeburn/monitor.pl
diff -u modules/raeburn/monitor.pl:1.6 modules/raeburn/monitor.pl:1.7
--- modules/raeburn/monitor.pl:1.6 Thu Feb 15 14:01:43 2007
+++ modules/raeburn/monitor.pl Tue Aug 28 14:43:06 2007
@@ -1,4 +1,7 @@
#! /usr/bin/perl
+#
+# $Id: monitor.pl,v 1.7 2007/08/28 18:43:06 raeburn Exp $
+#
use strict;
use lib qw(/usr/lib/perl5/site_perl/);
use HTTP::Request::Common;
@@ -11,7 +14,7 @@
# monitor.pl
#
# Stuart Raeburn, March 28, 2005
-# updated January 28, 2007
+# updated January 28, 2007; August 28, 2007
#
#########################################################
#
@@ -148,9 +151,9 @@
# username field - name is AlternateID
# password field - name must be screen-scraped
#
-# - ssourls.txt (URLs for login, and expected redirect when authenticated)
+# - ssourls.txt (URL for login, and expected path for redirect when authenticated)
# login=https://login.msu.edu/AppLogin.Asp
-# redirect=https://login.msu.edu/AppWelcome.Asp?
+# redirect=adm/roles?Token=
#
########################################################
# Configuration
@@ -539,7 +542,8 @@
my $cookie = $loncookie_file->as_string;
if ($res->is_redirect()) {
my $newurl = $res->header( "location" );
- if ($newurl eq $ssourlref->{'redirect'}) {
+ my $redirpath = $ssourlref->{'redirect'};
+ if ($newurl =~ /^http:\/\/\Q$$serverref\E\/\Q$redirpath\E/) {
my $end = [gettimeofday];
$loadtimes{sso} = tv_interval $start, $end;
$loadtimes{sso} *= 1000;