From: Joey Hess Date: Tue, 26 Jul 2011 15:29:36 +0000 (+0200) Subject: Fix typo in Danish translation of shortcuts page that caused expoentional regexp blowup. X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/f2529edcab749d9007c6e5d28734554aa8a28d1b?ds=sidebyside Fix typo in Danish translation of shortcuts page that caused expoentional regexp blowup. Complex regular subexpression recursion limit (32766) exceeded at /home/joey/src/ikiwiki/IkiWiki.pm line 1532. This doesn't fix the blowup potential itself, it just fixes the typo. :) A sample page that causes the blowup is attached below for future reference. The first directive is not terminated. Contributing are the additional quotes around the following directives, which mean that they can each be processed as a parameter to the first directive, or as an individual directive. In resolving this ambiguity, the regexp blows up. Happily, perl contains the explosion , so I don't think there is an exploit here. "[[!shortcut name=wiktionary url=\"https://secure.wikimedia.org/wiktionary/en/" "[[!shortcut name=debss url=\"http://snapshot.debian.net/package/%s\"]]" "[[!shortcut name=debwiki url=\"http://wiki.debian.org/%s\"]]" "[[!shortcut name=fdobug url=\"https://bugs.freedesktop.org/show_bug.cgi?id=%s\" desc=\"freedesktop.org bug #%s\"]]" "[[!shortcut name=fdolist url=\"http://lists.freedesktop.org/mailman/listinfo/%s\" desc=\"%s@lists.freedesktop.org\"]]" "[[!shortcut name=cpanrt url=\"https://rt.cpan.org/Ticket/Display.html?id=%s\" desc=\"CPAN RT#%s\"]]" "[[!shortcut name=novellbug url=\"https://bugzilla.novell.com/show_bug.cgi?id=%s\" desc=\"bug %s\"]]" "[[!shortcut name=fdolist url=\"http://lists.freedesktop.org/mailman/listinfo/%s\" desc=\"%s@lists.freedesktop.org\"]]" "[[!shortcut name=gnomebug url=\"http://bugzilla.gnome.org/show_bug.cgi?id=%s\" desc=\"GNOME bug #%s\"]]" "[[!shortcut name=linuxbug url=\"http://bugzilla.kernel.org/show_bug.cgi?id=%s\" desc=\"Linux bug #%s\"]]" "[[!shortcut name=gmane url=\"http://dir.gmane.org/gmane.%s\" desc=\"gmane.%s\"]]" "[[!shortcut name=gmanemsg url=\"http://mid.gmane.org/%s\"]]" "[[!shortcut name=cpan url=\"http://search.cpan.org/search?mode=dist&query=%s\"]]" "[[!shortcut name=ctan url=\"http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=%s\"]]" "[[!shortcut name=hoogle url=\"http://haskell.org/hoogle/?q=%s\"]]" "[[!shortcut name=iki url=\"http://ikiwiki.info/%S/\"]]" "[[!shortcut name=ljuser url=\"http://%s.livejournal.com/\"]]" "[[!shortcut name=rfc url=\"http://www.ietf.org/rfc/rfc%s.txt\" desc=\"RFC %s\"]]" "[[!shortcut name=c2 url=\"http://c2.com/cgi/wiki?%s\"]]" "[[!shortcut name=meatballwiki url=\"http://www.usemod.com/cgi-bin/mb.pl?%s\"]]" "[[!shortcut name=emacswiki url=\"http://www.emacswiki.org/cgi-bin/wiki/%s\"]]" "[[!shortcut name=haskellwiki url=\"http://haskell.org/haskellwiki/%s\"]]" "[[!shortcut name=dict url=\"http://www.dict.org/bin/Dict?Form=Dict1&Strategy=*&Database=*&Query=%s\"]]" "[[!shortcut name=imdb url=\"http://imdb.com/find?q=%s\"]]" "[[!shortcut name=gpg url=\"http://pgpkeys.mit.edu:11371/pks/lookup?op=vindex&exact=on&search=0x%s\"]]" "[[!shortcut name=perldoc url=\"http://perldoc.perl.org/search.html?q=%s\"]]" "[[!shortcut name=whois url=\"http://reports.internic.net/cgi/whois?whois_nic=%s&type=domain\"]]" "[[!shortcut name=cve url=\"http://cve.mitre.org/cgi-bin/cvename.cgi?name=%s\"]]" "[[!shortcut name=cia url=\"http://cia.vc/stats/project/%s\"]]" "[[!shortcut name=ciauser url=\"http://cia.vc/stats/user/%s\"]]" "[[!shortcut name=flickr url=\"http://www.flickr.com/photos/%s\"]]" "[[!shortcut name=man url=\"http://linux.die.net/man/%s\"]]" "[[!shortcut name=ohloh url=\"http://www.ohloh.net/projects/%s\"]]" "[[!shortcut name=cpanrt url=\"https://rt.cpan.org/Ticket/Display.html?id=%s\" desc=\"CPAN RT#%s\"]]" "[[!shortcut name=novellbug url=\"https://bugzilla.novell.com/show_bug.cgi?id=%s\" desc=\"bug %s\"]]" --- diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 05132a8a8..235efd299 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -776,6 +776,7 @@ sub refresh () { my $oldlink_targets=calculate_old_links($changed, $del); foreach my $file (@$changed) { + print ">>render $file\n"; scan($file); } diff --git a/debian/changelog b/debian/changelog index 40d18368d..0cb094a8d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ ikiwiki (3.20110716) UNRELEASED; urgency=low * mercurial: Make both rcs_getctime and rcs_getmtime fast. (Daniel Andersson) * mercurial: Implement rcs_diff. (Daniel Andersson) * po: Add `LANG_CODE` and `LANG_NAME` template variables. (intrigeri) + * Fix typo in Danish translation of shortcuts page that caused expoentional + regexp blowup. -- Joey Hess Tue, 19 Jul 2011 11:22:52 -0400 diff --git a/po/underlays/basewiki/shortcuts.da.po b/po/underlays/basewiki/shortcuts.da.po index 3e4d1ad30..798b78f54 100644 --- a/po/underlays/basewiki/shortcuts.da.po +++ b/po/underlays/basewiki/shortcuts.da.po @@ -88,6 +88,7 @@ msgid "" "wiki/%s\"]]" msgstr "" "[[!shortcut name=wiktionary url=\"https://secure.wikimedia.org/wiktionary/en/" +"wiki/%s\"]]" #. type: Bullet: '* ' msgid ""