[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm

www lon-capa-cvs@mail.lon-capa.org
Tue, 07 Jun 2005 13:42:05 -0000


www		Tue Jun  7 09:42:05 2005 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
  Log:
  Avoid "Harvard Problem"
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.65 loncom/auth/lonlogin.pm:1.66
--- loncom/auth/lonlogin.pm:1.65	Mon Jun  6 22:14:28 2005
+++ loncom/auth/lonlogin.pm	Tue Jun  7 09:42:03 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.65 2005/06/07 02:14:28 www Exp $
+# $Id: lonlogin.pm,v 1.66 2005/06/07 13:42:03 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -279,7 +279,8 @@
                   'servadm' => 'Server Administration',
                   'sysadm' => 'System Administration',
                   'helpdesk' => 'Contact Helpdesk');
-
+# -------------------------------------------------- Change password field name
+    my $now=time;
 # ---------------------------------------------------------- Serve rest of page
     $r->print(<<ENDSCRIPT);
 
@@ -318,11 +319,14 @@
         initkeys();
 
         this.document.server.elements.upass0.value
-	    =crypted(this.document.client.elements.upass.value.substr(0,15));
+	    =crypted(this.document.client.elements.upass$now.value.substr(0,15));
 	this.document.server.elements.upass1.value
-	    =crypted(this.document.client.elements.upass.value.substr(15,15));
+	    =crypted(this.document.client.elements.upass$now.value.substr(15,15));
 	this.document.server.elements.upass2.value
-	    =crypted(this.document.client.elements.upass.value.substr(30,15));
+	    =crypted(this.document.client.elements.upass$now.value.substr(30,15));
+
+        this.document.client.elements.uname.value='';
+        this.document.client.elements.upass$now.value='';
 
         this.document.server.submit();
 	return false;
@@ -449,7 +453,7 @@
       </tr>
       <tr>
        <td bgcolor="$mainbg"><font size=-1><b>&nbsp;&nbsp;&nbsp;$lt{'pw'}:</b></font></td>
-       <td bgcolor="$mainbg"><input type="password" name="upass" size="10" /></td>
+       <td bgcolor="$mainbg"><input type="password" name="upass$now" size="10" /></td>
       </tr>
       <tr>
        <td bgcolor="$mainbg"><font size=-1><b>&nbsp;&nbsp;&nbsp;$lt{'dom'}:</b></font></td>