From 8ca397c2c61221558eb31e20c769929f74729883 Mon Sep 17 00:00:00 2001 From: "http://www.cse.unsw.edu.au/~willu/" Date: Tue, 22 Jul 2008 22:48:19 -0400 Subject: Report bug in map wrt bare directories --- ...map_is_inconsistent_about_bare_directories.mdwn | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/bugs/map_is_inconsistent_about_bare_directories.mdwn (limited to 'doc/bugs') diff --git a/doc/bugs/map_is_inconsistent_about_bare_directories.mdwn b/doc/bugs/map_is_inconsistent_about_bare_directories.mdwn new file mode 100644 index 000000000..479db3e0f --- /dev/null +++ b/doc/bugs/map_is_inconsistent_about_bare_directories.mdwn @@ -0,0 +1,26 @@ +The [[plugins/map]] plugin has inconsistent behaviour. In particular, I have in my wiki some directory structures holding files without wikitext pointers (I point directly to the files from elsewhere). For example, imagine the following file structure in the source dir: + +* Assignments.mdwn +* Assignments + * 2004 + * Assign1.pdf + * Assign2.pdf + * 2005 + * Assign1.pdf + * Assign2.pdf + * 2006 + * etc., etc. + +When I use map to make a map of this, the result looks more like this: + +* Assignments # this is a link to the correct page + * 2004 # this has a create link + * Assign1.pdf + * Assign2.pdf + * Assign1.pdf + * Assign2.pdf + * etc., etc. + +Note that while the 2004 directory exists with a create link, the 2005 and 2006 (etc) directories are missing from the site map. + +I could imagine including all 'bare' directories in the map, and I could imagine including no 'bare' directories in the map. Just including the first bare directory seems a strange intermediate point. -- cgit v1.2.3 From f213303f4351ffbe560d0237e2a88acbc9d9ed1e Mon Sep 17 00:00:00 2001 From: "http://ptecza.myopenid.com/" Date: Wed, 23 Jul 2008 06:11:18 -0400 Subject: * Bug? --- doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn (limited to 'doc/bugs') diff --git a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn new file mode 100644 index 000000000..f7e1c80f0 --- /dev/null +++ b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn @@ -0,0 +1,7 @@ +I've just noticed that `attachment` plugin esacapes underscore characters +in attached filenames. For example, when I wanted to add +`foo_bar_baz.txt` file, then Ikiwiki added file `foo__95__bar__95__baz.txt` +to my Subversion repo. I hope that the filename is terribly ugly not only +for me ;) + +Is it a bug or security feature? --[[Paweł|ptecza]] -- cgit v1.2.3 From 5467015fbdfb98ee406e870a5329c5728a9389a4 Mon Sep 17 00:00:00 2001 From: "http://ptecza.myopenid.com/" Date: Wed, 23 Jul 2008 06:12:12 -0400 Subject: * Typo --- doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/bugs') diff --git a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn index f7e1c80f0..69c9e31fd 100644 --- a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn +++ b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn @@ -1,5 +1,5 @@ -I've just noticed that `attachment` plugin esacapes underscore characters -in attached filenames. For example, when I wanted to add +I've just noticed that `attachment` plugin escapes the underscore +characters in attached filenames. For example, when I wanted to add `foo_bar_baz.txt` file, then Ikiwiki added file `foo__95__bar__95__baz.txt` to my Subversion repo. I hope that the filename is terribly ugly not only for me ;) -- cgit v1.2.3 From 89ca6143eee50fc75499eaacf9022d65cfe0adc7 Mon Sep 17 00:00:00 2001 From: "http://ptecza.myopenid.com/" Date: Wed, 23 Jul 2008 07:19:24 -0400 Subject: * Update --- .../attachment:_escaping_underscores_in_filename__63__.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/bugs') diff --git a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn index 69c9e31fd..509edd3fa 100644 --- a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn +++ b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn @@ -5,3 +5,13 @@ to my Subversion repo. I hope that the filename is terribly ugly not only for me ;) Is it a bug or security feature? --[[Paweł|ptecza]] + +>> Update: It's not only problem with attached filenames. I have +>> `mysql/myisam_vs_ndb.mdwn` page in my wiki and attached two +>> images (`myisam_vs_ndb_sql.png` and `myisam_vs_ndb_cpu.png`) +>> and one OpenDocument file (`myisam_vs_ndb.ods`). Ikiwiki placed +>> them into `myisam__95__vs__95__ndb` subdirectory as +>> `myisam__95__vs__95__ndb__95__sql.png`, `myisam__95__vs__95__ndb__95__cpu.png` +>> and `myisam__95__vs__95__ndb.ods` files. When I click "Attachments" link, +>> I can't see my uploaded files, because there are in another subdirectory +>> (`myisam__95__vs__95__ndb` instead of `myisam_vs_ndb`). --[[Paweł|ptecza]] -- cgit v1.2.3 From 1d1767192c80548755655cfe1ce8e503b392c7c1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Jul 2008 14:58:39 -0400 Subject: attachment: Do not escape _ when determining attachment filenames. --- IkiWiki/Plugin/attachment.pm | 2 +- debian/changelog | 1 + doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/bugs') diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 01d0d2478..3982c4883 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -102,7 +102,7 @@ sub formbuilder (@) { #{{{ } } - $filename=IkiWiki::titlepage( + $filename=IkiWiki::linkpage( IkiWiki::possibly_foolish_untaint( attachment_location($form->field('page')). IkiWiki::basename($filename))); diff --git a/debian/changelog b/debian/changelog index 7ab18a2c7..c699f698b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ ikiwiki (2.55) UNRELEASED; urgency=low * Add allow_symlinks_before_srcdir config setting that can be used to avoid a security check that is a good safe default, but problimatic overkill in some situations. + * attachment: Do not escape _ when determining attachment filenames. -- Joey Hess Mon, 21 Jul 2008 11:35:46 -0400 diff --git a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn index 509edd3fa..d7d101700 100644 --- a/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn +++ b/doc/bugs/attachment:_escaping_underscores_in_filename__63__.mdwn @@ -15,3 +15,5 @@ Is it a bug or security feature? --[[Paweł|ptecza]] >> and `myisam__95__vs__95__ndb.ods` files. When I click "Attachments" link, >> I can't see my uploaded files, because there are in another subdirectory >> (`myisam__95__vs__95__ndb` instead of `myisam_vs_ndb`). --[[Paweł|ptecza]] + +> [[done]], uses `linkpage` now. -- cgit v1.2.3