From: Ricardo Stella (stella@rider.edu)
Date: Mon Jul 19 2004 - 08:26:45 CDT
Fix the bug... It's on the find_conf{} routine, and it could be
triggered based on other factors... I compared it with the find_lease{}
routine and that's how I saw the bug.
Basically, I had to replace $1 with the or original variable
$FORM{'query'}
# $USER =~ s/$FORM{'query'}/<b>$1<\/b>/;
$USER =~ s/$FORM{'query'}/<b>$FORM{'query'}<\/b>/;
Same goes for the definitions of $MAC, $PLATFORM and $DATE. Patch
follows:
-------Begin patch------------
--- admin.cgi 2004-07-19 09:19:07.843968048 -0400
+++ admin.cgi.ORIG 2004-07-19 09:18:35.767844360 -0400
@@ -144,10 +144,10 @@
}
print "</TD>";
- $USER =~ s/$FORM{'query'}/<b>$FORM{'query'}<\/b>/;
- $MAC =~ s/$FORM{'query'}/<b>$FORM{'query'}<\/b>/;
- $PLATFORM =~ s/$FORM{'query'}/<b>$FORM{'query'}<\/b>/;
- $DATE =~ s/$FORM{'query'}/<b>$FORM{'query'}<\/b>/;
+ $USER =~ s/$FORM{'query'}/<b>$1<\/b>/;
+ $MAC =~ s/$FORM{'query'}/<b>$1<\/b>/;
+ $PLATFORM =~ s/$FORM{'query'}/<b>$1<\/b>/;
+ $DATE =~ s/$FORM{'query'}/<b>$1<\/b>/;
print "<TD bgcolor=$color>$MAC</TD><TD
bgcolor=$color>$PLATFOR
M";
print "</TD><TD bgcolor=$color
align=center>$DATE</TD><TD>";
$MAC =~ s/<b>//;
----------END Patch-------------
Robert Lowe wrote:
>
> Ricardo Stella wrote:
>
> Ricardo,
>
> > Found a bug trying to delete a user info... I'm not good at perl, so I
> > need help.
>
> I am unable to reproduce *any* of the test cases you record below. In
> each and every case I tried (searching for MAC address, partial or full,
> username, partial or full), the delete function listed the full username
> and MAC address. When I did delete it, it did indeed go away. Is it
> possible you've not fully replaced pieces of the standard distro with
> the new ones in the CIDR kit??
>
> -Robert
>
> > When you enter a query for Find MAC or Find User, you cannot delete the
> > entry form those results.
> >
> > MAC query example:
> >
> > * Find Full Mac address (ie 00:11:22:33:44:55) results in the following
> > info:
> >
> > testuser | <BLANK MAC ADDR> | Mozilla | 20040712 16:18:39
> >
> > The X button will try to execute as an action:
> >
> > cgi-bin/admin/admin.cgi?action=FL&USER=testuser&MAC=
> >
> > * Find PARTIAL Mac address (ie 00:11:33) results in the following info:
> >
> > testuser | :33:44:55 | Mozilla | 20040712 16:18:39
> >
> > The X button will try to execute as an action:
> >
> > cgi-bin/admin/admin.cgi?action=FL&USER=testuser&MAC=:33:44:55
> >
> > USER query example:
> >
> > * Find full username (ie testuser) results in the following info:
> >
> > testuser | 00:11:22:33:44:55 | Mozilla | 20040712 16:18:39
> >
> > The X button will try to execute:
> >
> > cgi-bin/admin/admin.cgi?action=FL&USER=&MAC=00:11:22:33:44:55
> >
> > * Find PARTIAL username (ie testu) results in:
> >
> > ser | 00:11:22:33:44:55 | Mozilla | 20040712 16:18:39
> >
> > The X button tries to execute:
> >
> > cgi-bin/admin/admin.cgi?action=FL&USER=ser&MAC=00:11:22:33:44:55
> >
> >
> > Thanks for your help...
>
> **********************************************************************
> To unsubscribe from this list, send an e-mail message to
> majordomo@southwestern.edu containing a single line with the words:
> unsubscribe netreg
> Send requests for assistance to: owner-netreg@southwestern.edu
> **********************************************************************
**********************************************************************
To unsubscribe from this list, send an e-mail message to
majordomo@southwestern.edu containing a single line with the words:
unsubscribe netreg
Send requests for assistance to: owner-netreg@southwestern.edu
**********************************************************************
This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:47 CDT