[LON-CAPA-cvs] cvs: modules /raeburn monitor.pl
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 12 May 2008 19:40:55 -0000
raeburn Mon May 12 15:40:55 2008 EDT
Modified files:
/modules/raeburn monitor.pl
Log:
- AIS at MSU changed the size of password field and maxlength allowed for Sentinel (SSO) log-in.
- Use regexp matches instead of exact numbers when screen scraping the log-in screen for the name of the password form element.
Index: modules/raeburn/monitor.pl
diff -u modules/raeburn/monitor.pl:1.8 modules/raeburn/monitor.pl:1.9
--- modules/raeburn/monitor.pl:1.8 Thu Dec 27 11:49:34 2007
+++ modules/raeburn/monitor.pl Mon May 12 15:40:55 2008
@@ -1,6 +1,6 @@
#! /usr/bin/perl
#
-# $Id: monitor.pl,v 1.8 2007/12/27 16:49:34 raeburn Exp $
+# $Id: monitor.pl,v 1.9 2008/05/12 19:40:55 raeburn Exp $
#
use strict;
use lib qw(/usr/lib/perl5/site_perl/);
@@ -14,7 +14,7 @@
# monitor.pl
#
# Stuart Raeburn, March 28, 2005
-# updated January 28, 2007; August 28, 2007; December 27,2007
+# updated January 28, 2007; August 28, 2007; December 27, 2007; May 12, 2008
#
#########################################################
#
@@ -400,7 +400,7 @@
my $outcome = 0;
my $paramcount = 0;
if ($sso) {
- if ($loginpage =~ m/<input\sname="([^"]+)"\stype="password"\svalue=""\ssize="10"\smaxlength="64"\s\/>/) {
+ if ($loginpage =~ m/<input\sname="([^"]+)"\stype="password"\svalue=""\ssize="\d+"\smaxlength="\d+"\s\/>/) {
$formvalues->{'password'} = $1;
$paramcount ++;
}
@@ -658,6 +658,9 @@
$loadtimes{initialize} = tv_interval $start, $end;
$loadtimes{initialize} *= 1000;
} else {
+ open (my $tempfh,">>/tmp/rolesfailed.txt");
+ print $tempfh "$server ".localtime(time)." $response->status_line\n";
+ close($tempfh);
$outcome = 'rolesfailed';
}
return $outcome;