help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Categories containing "++" make gnatsweb crash


From: Dieperink Alwin
Subject: Categories containing "++" make gnatsweb crash
Date: Mon, 20 Jan 2003 15:28:39 +0100

Hello,

When categories contain a "++" in their name, gnatsweb crashes with the
following error:

        Nested quantifiers in regex; marked by <-- HERE in m/^client-c++ <--
HERE $/ at /home/gnats/cgi-bin/gnatsweb.pl line 1610, <SOCK> line 2173.

which points to the line containing grep in this piece of code:

        sub edit
        ...
            if (fieldinfo ($_, 'fieldtype') eq 'enum')
            {
              my $default = $fields{$_};
              # Check whether field value is a known enumeration value.
              if (!(grep /^$default$/, @$values))
              {
                push(@$values, 'unknown') if (!grep /^unknown$/, @$values);
                $default = 'unknown';
              }
              print popup_or_scrolling_menu($_, $values, $default),
                    "</td>\n</tr>\n";
            }
        ...

When I replaced the name of the category client-c++ with client-cpp and made
all necessary changes in the PR's it works fine. The example file
"categories" doesn't warn against this and in there is an example which
wouldn't work (g++).

There are several solutions:
1) restrict the use of special characters in category names and correct
"categories"
2) correct the use of grep in gnatsweb.
3) ...

My preference goes actually to the first solution.

Regards
-- Alwin

Environment: Gnatsweb v3.99.4, Gnats v4.0-beta2







reply via email to

[Prev in Thread] Current Thread [Next in Thread]