]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/bugs/opendiscussion_should_respect_the_discussion_option/discussion.mdwn
update test suite for svg passthrough by img directive
[git.ikiwiki.info.git] / doc / bugs / opendiscussion_should_respect_the_discussion_option / discussion.mdwn
1 This would be great to see fixed. It's perplexing to have discussion => 0 in my configuration, not have any discussion links on my site, but still be able to add a discussion page by URL hacking something like this: /cgi-bin/ikiwiki/ikiwiki.cgi?page=posts%2Fdiscussion&do=edit.
3 spammers have figured that little trick out so I am consitently getting spammed checked into my git repository.
5 I'm not really sure if this patch introduced other problems, but it seems to have fixed my site:
7                 0 mcclelland@chavez:~/.ikiwiki/IkiWiki/Plugin$ diff -u /usr/share/perl5/IkiWiki/Plugin/opendiscussion.pm opendiscussion.pm 
8                 --- /usr/share/perl5/IkiWiki/Plugin/opendiscussion.pm   2012-05-07 11:31:24.000000000 -0400
9                 +++ opendiscussion.pm   2012-07-29 17:49:28.000000000 -0400
10                 @@ -25,7 +25,7 @@
11                         my $cgi=shift;
12                         my $session=shift;
13                  
14                 -       return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i;
15                 +       return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i && $config{discussion};
16                         return "" if pagespec_match($page, "postcomment(*)");
17                         return undef;
18                  }
19                 1 mcclelland@chavez:~/.ikiwiki/IkiWiki/Plugin$  
21 If libdir is configured to be ~/.ikiwiki in your ikiwiki.settings file, and you are running Debian, you can do the following:
23                 mkdir -p ~/.ikiwiki/IkiWiki/Plugin
24                 cp /usr/share/perl5/IkiWiki/Plugin/opendiscussion.pm ~/.ikiwiki/IkiWiki/Plugin/
26 And then apply the patch above to ~/.ikiwiki/Ikiwiki/Plugin/opendiscussion.pm.