hitting Enter in login window brings another one

Ilguiz Latypov ilatypov at superbt.com
Thu, 18 Jul 2002 19:23:00 -0400 (EDT)


Hitting the Enter key after typing the user name and password brings 
another NoCat authorisation window with the user name and password already 
filled in and without paramters in URL.

It turns out that the $params->{"mode_login.x"} expands to 0 and thus does
not produce a list element as a result of grep function when Enter is
pressed.

Will the patch below resolve this issue?  I can now log in by pressing the 
Enter key or by clicking the Login button with mouse.

Ilguiz

Index: cgi-bin/login
===================================================================
RCS file: /usr/local/cvsroot/nocat/cgi-bin/login,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 login
--- cgi-bin/login	8 Jul 2002 21:45:58 -0000	1.1.1.1
+++ cgi-bin/login	18 Jul 2002 23:14:34 -0000
@@ -38,7 +38,8 @@
 );
 
 # Figure out which image button was clicked (since they don't have value="" attributes).
-if (my ($button) = grep $params->{"mode_$_.x"}, qw( login skip logout )) {
+if (my ($button) = 
+        grep defined ($params->{"mode_$_.x"}), qw( login skip logout )) {
     delete $params->{$_} for ( "mode_$button.x", "mode_$button.y" );
     $params->{mode} = $button;
 }