public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* Categories containing "++" make gnatsweb crash
@ 2003-01-20 14:34 Dieperink Alwin
  2003-04-29 19:47 ` Yngve Svendsen
  0 siblings, 1 reply; 5+ messages in thread
From: Dieperink Alwin @ 2003-01-20 14:34 UTC (permalink / raw)
  To: 'help-gnats@gnu.org'

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





_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-06 21:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-20 14:34 Categories containing "++" make gnatsweb crash Dieperink Alwin
2003-04-29 19:47 ` Yngve Svendsen
2003-05-05 17:48   ` Lars Henriksen
2003-05-06  9:31     ` Yngve Svendsen
2003-05-06 21:13     ` Yngve Svendsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).