{"thread":{"id":"29238","subject":"\"Nested quantifiers\" error in gitweb with \"++\" in the filename","startedAt":"2011-12-22T20:37:52Z","lastAt":"2011-12-23T19:37:23Z","messageCount":3,"participants":["Jehan Bing","demerphq"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"181625","messageId":"jd04eq$9m0$1@dough.gmane.org","threadId":"29238","inReplyTo":null,"subject":"\"Nested quantifiers\" error in gitweb with \"++\" in the filename","fromName":"Jehan Bing","fromEmail":"jehan@orb.com","sentAt":"2011-12-22T20:37:52Z","receivedAt":"2011-12-22T20:37:52Z","isPatch":false,"sender":{"key":"jehan@orb.com","avatar":null},"body":"Hi,\n\nI'm getting an error when trying to look at a blob when the filename has \n\"++\" in it:\n\nhttp://.../blob/13ec1624fefc23d20d0407aac3337b35844a2ceb:/foo-++.txt\n\nAnd I get the following error page:\n\tgitprojects /\n\n\n\t500 - Internal Server Error\n\tNested quantifiers in regex; marked by <-- HERE in \nm//test.git/blob/13ec1624fefc23d20d0407aac3337b35844a2ceb:/foo-++ <-- \nHERE .txt$/ at (eval 10) line 7.\n\tOPML TXT\n\n\nThe Apache log show the same thing:\n  gitweb.cgi: Nested quantifiers in regex; marked by <-- HERE in \nm//test.git/blob/13ec1624fefc23d20d0407aac3337b35844a2ceb:/foo-++ <-- \nHERE .txt$/ at (eval 10) line 7.\n\n\nIt works fine if the filename has a single '+' sign (tried \"foo-+.txt\").\nThere is a same error when browsing a tree and clicking a directory with \nthe \"++\"\n\nWe notice the error when looking at the Qt source code. They have a \nbunch of \"*g++*\" files and directories.\n\nWe use git-1.7.6 but updating to gitweb.cgi from 1.7.8.1 didn't fix it.\n\n\nRegards,\n\tJehan\n"},{"id":"181642","messageId":"CANgJU+VA9s9t0c8D0P_DesbSDQRBQ6v913KixKQAuiy8jZsdzQ@mail.gmail.com","threadId":"29238","inReplyTo":"jd04eq$9m0$1@dough.gmane.org","subject":"Re: \"Nested quantifiers\" error in gitweb with \"++\" in the filename","fromName":"demerphq","fromEmail":"demerphq@gmail.com","sentAt":"2011-12-23T16:02:22Z","receivedAt":"2011-12-23T16:02:22Z","isPatch":false,"sender":{"key":"demerphq@gmail.com","avatar":null},"body":"On 22 December 2011 21:37, Jehan Bing <jehan@orb.com> wrote:\n> Hi,\n>\n> I'm getting an error when trying to look at a blob when the filename has\n> \"++\" in it:\n>\n> http://.../blob/13ec1624fefc23d20d0407aac3337b35844a2ceb:/foo-++.txt\n\nThis error comes because the filename is being used a pattern without\nbeing protected by a quotemeta.\n\nInterestingly, a later version of perl would not have this problem as\n++ is a legal quantifier as of 5.10, nevertheless it probably wouldnt\ndo what you expected.\n\nyves\n-- \nperl -Mre=debug -e \"/just|another|perl|hacker/\"\n"},{"id":"181648","messageId":"4EF4D873.4090803@orb.com","threadId":"29238","inReplyTo":"CANgJU+VA9s9t0c8D0P_DesbSDQRBQ6v913KixKQAuiy8jZsdzQ@mail.gmail.com","subject":"Re: \"Nested quantifiers\" error in gitweb with \"++\" in the filename","fromName":"Jehan Bing","fromEmail":"jehan@orb.com","sentAt":"2011-12-23T19:37:23Z","receivedAt":"2011-12-23T19:37:23Z","isPatch":false,"sender":{"key":"jehan@orb.com","avatar":null},"body":"On 2011-12-23 08:02, demerphq wrote:\n> On 22 December 2011 21:37, Jehan Bing<jehan@orb.com>  wrote:\n>> Hi,\n>>\n>> I'm getting an error when trying to look at a blob when the filename has\n>> \"++\" in it:\n>>\n>> http://.../blob/13ec1624fefc23d20d0407aac3337b35844a2ceb:/foo-++.txt\n>\n> This error comes because the filename is being used a pattern without\n> being protected by a quotemeta.\n>\n> Interestingly, a later version of perl would not have this problem as\n> ++ is a legal quantifier as of 5.10, nevertheless it probably wouldnt\n> do what you expected.\n>\n\nInterestingly, a later version of perl would not have this problem as, \nafter investigating the problem further, it's actually a bug in CGI.pm \nwhich has since been fixed ;)\n\nMy distribution comes with an old version of CGI.pm (3.15 from perl \n5.8.8). After updating to the latest, the problem went away.\n"}]}