]> sipb.mit.edu Git - ikiwiki.git/commitdiff
responses
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 11 Feb 2007 22:09:44 +0000 (22:09 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 11 Feb 2007 22:09:44 +0000 (22:09 +0000)
doc/todo/shortcut_optional_parameters.mdwn
doc/todo/simple_text_parsing_or_regex_in_template_or_shortcut.mdwn

index 494aac98a5f9945805d081dda9ae7c850e74c184..4fd1eb9d42fde19553402c71ccdf6067c000a47e 100644 (file)
@@ -22,3 +22,10 @@ Some possible syntax choices for the shortcut definition:
     \[[shortcut name=debfiles url="http://packages.debian.org/cgi-bin/search_contents.pl?word=$*&searchmode=filelist&case=insensitive&version=${dist=unstable}&arch=${arch=i386}"]]
 
 --[[JoshTriplett]]
+
+Well, you can already do this kind of thing with templates. Invocation does
+look different:
+
+    \[[template id=debfiles package=ikiwiki dist=testing]]
+
+--[[Joey]]
index e6f77dd5993920114a7413c583d0e6a85adc9bf8..0f8badae8d26de2e35d356860f874a8298e97487 100644 (file)
@@ -7,4 +7,17 @@ shortcuts like these:
 
 For shortcut definitions, a `match` parameter could supply a regex, and then the `url` and `desc` parameters could make use of the named or numbered groups from the match.
 
---[[JoshTriplett]]
\ No newline at end of file
+--[[JoshTriplett]]
+
+I'm not comfortable with exposing regexps to web editing. At the very least
+it's trivial to construct regexps that take indefinitely long to match
+certain strings, which could be used to DOS ikiwiki. At worst, perl code
+can be embedded in regexps in a variety of ways that are painful to filter
+out, and perl's regexp engine could also potentially have bugs that could
+be exploited by user-supplied regexps.
+
+It seems that a better place to put this kind of text munging is in
+special-purpose plugins. It should be very simple to write plugins for the
+above two examples, that look identical to the user as what you described.
+
+--[[Joey]]