mainGnatsweb - Support: sr #102863, Gnatsweb 4 outputting broken HTML...

 
 

sr #102863: Gnatsweb 4 outputting broken HTML with Perl 5.8

Submitter:  None
Submitted:  Wed 25 Feb 2004 10:15:17 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Wont Do
Privacy:  Public Assigned to:  relberger
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 24 Mar 2014 10:39:29 AM UTC, comment #3: 

Perl 5.14+ supported at this time.

I am sure this issue may not be relevant any longer, please contact if still relevant.

Richard Elberger <relberger>
Group administrator
Wed 03 Nov 2004 10:10:07 AM UTC, comment #2: 

Looks like you used the gnatsweb-site-example.pl file which includes the callback function.  In the function, there is a callback for "page_start_html".  The callback overrides the page header with a simple header.  You can remove the following six lines of code to get back a normal heading:

# This routine is called from the page_start_html subroutine of
# gnatsweb.pl.  It overrides the default HTML written on top of
# each page, i.e. the banner and the button bar, replacing it with
# a very simplistic banner.
elsif ($reason eq 'page_start_html')
{
my $title = $args[0];
my $html = $q->b(uc("$title - $site_banner_text")) . $q->hr;
return $html;
}
There is no else that returns 0 to the whole clause so that could also be a problem. Before the last line of the callback routine (last line is a single right brace '}'), there should be a else {return 0}.  This is so the return value for unrecognized callbacks is false and the normal action occurs.
I would suggest that the sample comment out this section so a user would have to intentially uncomment it.

Stuart Stevens <stevensgb>
Thu 28 Oct 2004 11:04:27 PM UTC, comment #1: 

The gnatsweb-site.pl had only 13 lines when I retrieved the gnatsweb-4.0 tar.

Stuart Stevens <stevensgb>
Wed 25 Feb 2004 10:15:17 AM UTC, original submission:  

Hello.  I have a strange problem with gnatsweb producing bad HTML.  I'm not sure why.

Below is the HTML from the Main Page.  All other gnatsweb pages have similar broken HTML structure (ie no <html>, starting banner, etc).  I am using Perl 5.8 and Apache 2.0.48(.)  I wonder if there has been changes to Perl's CGI module to have affected this.  I attach my gnatsweb.pl.

By the way - the gnatsweb-site.pl that came with gnats 4 had a bug.  Lines 131 and 154 should have contained ^_ as single characters made with "ctrl(+shift)+_" but instead they're just two simple unencoded characters of "^_".  Thus if you click on either of the "not closed" or "open" cmd examples on the main page, the resulting query table is all messed up.

Example HTML of Main Page:

<b>MAIN - EEJNET PROBLEM REPORTING AND TRACKING SYSTEM</b><hr /><h1 style="font-weight: normal">Main Page</h1><table><tr valign="baseline"><td><b>Create Problem Report:</b></td> <td><form method="get" action="/cgi-bin/gnatsweb.pl" enctype="application/x-www-form-urlencoded">
 <input type="hidden" name="debug" value="" /> <input type="hidden" name="database" value="default" /> <input type="submit" name="cmd" value="create" /> </form></td></tr><tr valign="baseline"><td><b>Edit Problem Report:</b></td> <td><form method="get" action="/cgi-bin/gnatsweb.pl" enctype="application/x-www-form-urlencoded">
 <input type="hidden" name="debug" value="" /> <input type="hidden" name="database" value="default" /> <input type="hidden" name="cmd" value="edit" /> <input type="submit" name="cmd" value="edit" /> # <input type="text" name="pr"  size="6" /> </form></td></tr><tr valign="baseline"><td><b>View Problem Report:</b></td> <td><form method="get" action="/cgi-bin/gnatsweb.pl" enctype="application/x-www-form-urlencoded">
 <input type="hidden" name="debug" value="" /> <input type="hidden" name="database" value="default" /> <input type="hidden" name="cmd" value="view audit-trail" /> <input type="submit" name="cmd" value="view" /> # <input type="text" name="pr"  size="6" /> </form></td></tr><tr valign="baseline"><td><b>Query Problem Reports:</b></td> <td><form method="get" action="/cgi-bin/gnatsweb.pl" enctype="application/x-www-form-urlencoded">
 <input type="hidden" name="debug" value="" /> <input type="hidden" name="database" value="default" /> <input type="submit" name="cmd" value="query" /> &nbsp; <input type="submit" name="cmd" value="advanced query" /> </form></td></tr><tr valign="baseline"><td><b>Log Out / Change Database:&nbsp;</b></td> <td><form method="get" action="/cgi-bin/gnatsweb.pl" enctype="application/x-www-form-urlencoded">
 <input type="hidden" name="debug" value="" /> <input type="hidden" name="database" value="default" /> <input type="submit" name="cmd" value="logout" /> </form></td></tr><tr valign="baseline"><td><b>Get Help:</b></td> <td><form method="get" action="/cgi-bin/gnatsweb.pl" enctype="application/x-www-form-urlencoded">
 <input type="hidden" name="debug" value="" /> <input type="hidden" name="database" value="default" /> <input type="submit" name="cmd" value="help" /> </form></td></tr><tr valign="baseline"><td><b>Direct search:</b></td> <td><form method="get" action="/cgi-bin/gnatsweb.pl" enctype="application/x-www-form-urlencoded">
 <input type="hidden" name="debug" value="" /> <input type="hidden" name="database" value="default" /> <input type="submit" name="cmd" value="open" /> &nbsp; <input type="submit" name="cmd" value="not closed" /> </form></td></tr></table><hr><small>Gnatsweb v4.00, Gnats v4.0</small></body></html>

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #3828:  gnatsweb.pl added by None (126KiB - application/octet-stream - This is my gnatsweb.pl file)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by relberger (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-03-24 relberger StatusIn Progress Wont Do
        Open/ClosedOpen Closed
    2014-03-21 relberger Assigned toyngves relberger
    2006-09-14 yngves Severity6 - Security 3 - Normal
        StatusNone In Progress
        Assigned toNone yngves
    2004-02-25 None Attached File- Added gnatsweb.pl, #20

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code