[rt-devel] Search box bug
Cormac McGaughey
cormac at u.washington.edu
Sat Sep 27 19:44:00 EDT 2003
Problem: Enter a ticket number in RT 3's search box (top right
corner)
and hit search. Fastcgi will crash, requiring httpd to be restarted
URL shown is: http://xxxxx/rt3/index.html?q=233
Manully entering this URL will also crash RT3
Apache log error is:
[Sat Sep 27 14:05:24 2003] [error] [client 128.208.247.94] FastCGI:
comm
with server "/rt/rt3/bin/mason_handler.fcgi" aborted: error parsing
headers: malformed header
'Location="/rt3/Ticket/Display.html?id=233"',
referer: http://xxxxx/rt3/User/Prefs.html
I fixed this by modifing share/html/index.html as shown below:
---Excerpted before change
if ( $ARGS{'q'} ) {
my $query = $ARGS{'q'};
if ( $query =~ m/^\s*(\d+)\s*$/ ) {
$m->redirect("$RT::WebPath/Ticket/Display.html?id=$1");
}
$session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} );
if ( $query =~ m/\@/ ) {
$session{'tickets'}->LimitRequestor( VALUE => $query,
OPERATOR => '=', );
$m->redirect("$RT::WebPath/Search/Listing.html");
}
----- End of Excerpt
----- New Change
if ( $ARGS{'q'} ) {
my $query = $ARGS{'q'};
#Moved Ticket number query to below $session
$session{'tickets'} = RT::Tickets->new( $session{'CurrentUser'} );
if ( $query =~ m/^\s*(\d+)\s*$/ ) {
$session{'tickets'}->LimitRequestor( VALUE => $query,
OPERATOR => '=', );
$m->redirect("$RT::WebPath/Ticket/Display.html?id=$1");
}
if ( $query =~ m/\@/ ) {
$session{'tickets'}->LimitRequestor( VALUE => $query,
OPERATOR => '=', );
$m->redirect("$RT::WebPath/Search/Listing.html");
}
---- End of excerpt
As you can see I moved the ticket display line after the session
setup,
and copied a line from the next query. I did that because I wasn't
sure
what session setup did and was short on time to go explore code. It
seems to work so I've left it.
I'm reporting this bug to best practical as the same problem was in
3.0.6RC1
My configuration is Red Hat 9, Apache httpd-2.0.40-21.5, mysql
3.23.56-1.9, fastcgi 2.4.0, perl 5.8.0-88.3
Cormac
--
Cormac McGaughey
Computer Support Specialist
Institute of Technology
Pinkerton 205B
University of Washington Tacoma
1900 Commerce St. Box 358426
Phone: 253-692-4648
More information about the Rt-devel
mailing list