diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-05-18 15:25:10 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-05-18 15:25:10 -0400 |
commit | 23a4ee6d15dbd9b8e8c6588a829dd30a26a8de32 (patch) | |
tree | 5d7d76ba25bd6331e1f2940c481477ecb4de9d12 /t | |
parent | 0516ba04d014628be983dbd3e4c28a8f52a2c3e7 (diff) |
Allow curly braces to be used in pagespecs
And avoid a whole class of potential security problems (though
none that I know of actually existing..), by avoiding
performing any string interpolation on user-supplied data when translating
pagespecs.
Diffstat (limited to 't')
-rwxr-xr-x | t/pagespec_match.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/pagespec_match.t b/t/pagespec_match.t index 69cf361de..4cf6fa1ff 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 51; +use Test::More tests => 53; BEGIN { use_ok("IkiWiki"); } @@ -28,6 +28,8 @@ ok(pagespec_match("a/foo", "./*", "a/b"), "relative oldstyle call"); ok(pagespec_match("foo", "./*", location => "a"), "relative toplevel"); ok(pagespec_match("foo/bar", "*", location => "baz"), "absolute"); ok(! pagespec_match("foo", "foo and bar"), "foo and bar"); +ok(pagespec_match("{f}oo", "{*}*"), "curly match"); +ok(! pagespec_match("foo", "{*}*"), "curly !match"); # The link and backlink stuff needs this. $config{userdir}=""; |