[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm lonlogin.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 07 Jun 2005 02:14:30 -0000
www Mon Jun 6 22:14:30 2005 EDT
Modified files:
/loncom/auth lonauth.pm lonlogin.pm
Log:
Bug #2616: password can have 45 characters now
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.66 loncom/auth/lonauth.pm:1.67
--- loncom/auth/lonauth.pm:1.66 Thu Apr 7 02:56:21 2005
+++ loncom/auth/lonauth.pm Mon Jun 6 22:14:28 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.66 2005/04/07 06:56:21 albertel Exp $
+# $Id: lonauth.pm,v 1.67 2005/06/07 02:14:28 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -340,7 +340,7 @@
$FORM{$name}=$value;
}
- if ((!$FORM{'uname'}) || (!$FORM{'upass'}) || (!$FORM{'udom'})) {
+ if ((!$FORM{'uname'}) || (!$FORM{'upass0'}) || (!$FORM{'udom'})) {
failed($r,'Username, password and domain need to be specified.');
return OK;
}
@@ -381,14 +381,17 @@
else {
$cipher=new DES $keybin;
}
+ my $upass='';
+ for (my $i=0;$i<=2;$i++) {
+ my $chunk=
+ $cipher->decrypt(unpack("a8",pack("H16",substr($FORM{'upass'.$i},0,16))));
- my $upass=$cipher->decrypt(
- unpack("a8",pack("H16",substr($FORM{'upass'},0,16))));
+ $chunk.=
+ $cipher->decrypt(unpack("a8",pack("H16",substr($FORM{'upass'.$i},16,16))));
- $upass.=$cipher->decrypt(
- unpack("a8",pack("H16",substr($FORM{'upass'},16,16))));
-
- $upass=substr($upass,1,ord(substr($upass,0,1)));
+ $chunk=substr($chunk,1,ord(substr($chunk,0,1)));
+ $upass.=$chunk;
+ }
# ---------------------------------------------------------------- Authenticate
my $authhost=Apache::lonnet::authenticate($FORM{'uname'},
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.64 loncom/auth/lonlogin.pm:1.65
--- loncom/auth/lonlogin.pm:1.64 Wed Apr 27 21:19:20 2005
+++ loncom/auth/lonlogin.pm Mon Jun 6 22:14:28 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.64 2005/04/28 01:19:20 albertel Exp $
+# $Id: lonlogin.pm,v 1.65 2005/06/07 02:14:28 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -317,8 +317,12 @@
lextkey=this.document.client.elements.lextkey.value;
initkeys();
- this.document.server.elements.upass.value
- =crypted(this.document.client.elements.upass.value);
+ this.document.server.elements.upass0.value
+ =crypted(this.document.client.elements.upass.value.substr(0,15));
+ this.document.server.elements.upass1.value
+ =crypted(this.document.client.elements.upass.value.substr(15,15));
+ this.document.server.elements.upass2.value
+ =crypted(this.document.client.elements.upass.value.substr(30,15));
this.document.server.submit();
return false;
@@ -337,7 +341,9 @@
<input type="hidden" name="serverid" value="$lonhost" />
<input type="hidden" name="interface" value="$env{'form.interface'}" />
<input type="hidden" name="uname" value="" />
- <input type="hidden" name="upass" value="" />
+ <input type="hidden" name="upass0" value="" />
+ <input type="hidden" name="upass1" value="" />
+ <input type="hidden" name="upass2" value="" />
<input type="hidden" name="udom" value="" />
<input type="hidden" name="imagesuppress" value="" />
<input type="hidden" name="appletsuppress" value="" />