[ 新規 | 編集 | 差分 ] [ 検索 | 一覧 | FrontPage ] [ 履歴 (RSS) | 差分履歴 (RSS) ] [ ログイン ]
【PR】Amazon | SL-C3000 | SL-C1000(3/18発売!) | SL-C860 | SL-6000W | SL-6000L | SL-6000N

WalWiki/バグ報告

編集

WalWikiバグ報告用ページ

テーブルが正しく閉じられない場合がある

編集
WalWiki2.0.5.wal.4.3

[close pre correctly]と同様の処理をテーブルタグに関しても行う必要があります。

    for (my $line = 0; $line < @txt; $line++) {
        $_ = $txt[$line];
        chomp;
        push(@result, shift(@saved)) if (@saved and $saved[0] eq '</pre>' and /^[^ \t]/);
        push(@result, shift(@saved)) if (@saved and $saved[0] eq '</table>' and /^[^,]/);    # yakty add [close table correctly]
        # Walrus mod [HTML mode] start
[[#rcomment]]

frontpage.txtを使用しない設定がうまく動作しない

編集
WalWiki2.0.5.wal.4.3

my $use_frontpage_file = 0;
に設定してもうまく動作しないようです。

my %fixedpage = (
    $IndexPage => 1,
    $CreatePage => 1,
    $ErrorPage => 1,
    $RssPage => 1,
    $RecentChanges => 1,
    $SearchPage => 1,
    $AdminChangePassword => 1,
    $CompletedSuccessfully => 1,
    $FrontPage => 1,
);

上記の定義があるのでis_editable()も修正しないと動かないと思います。
例えば下記の様な感じで。

sub is_editable {
    my ($page) = @_;
    if (&is_bracket_name($page)) {
        return 0;
    # add [use front page file] start
    } elsif ($page eq $FrontPage and not $use_frontpage_file) {
        return 1;
    # add [use front page file] end
    } elsif ($fixedpage{$page}) {  # 上の処理を追加しないとここでnot editableと判断されてしまう
        return 0;
    } elsif ($page =~ /\s/) {
        return 0;
    } elsif ($page =~ /^\#/) {
        return 0;
    } elsif ($page =~ /^$interwiki_name$/) {
        return 0;
    } else {
        return 1;
    }
}
    # Walrus add [use front page file] start
    if (not $use_frontpage_file and &is_exist_page($FrontPage)) {
        ($form{mycmd}, $form{mypage}) = ('read', $FrontPage);
        &do_read;
        return;
    }
    # Walrus add [use front page file] end

上記の処理はfrontpage.txtを使用しない設定で、$FrontPageというページが存在したら表示する。
という処理だと思っていたのですが、違うのでしょうか?
現状の処理だと、$FrontPageというページを作成しようとしても作成できない(%fixedpageになっているから)ので
&is_exist_page($FrontPage)が真になる事は有り得ないと思うのですがいかがでしょうか?
その為、ページ指定無しまたは上のメニューでFrontPageを選ぶと必ずErrorPage?になってしまうのですが
そのような仕様ですか?

先頭の#rcommentの動作が#commentと同じになってしまっている。

編集
    unless ($content =~ s/^(\Q$embed_comment\E)/- $datestr$namestr$form{mymsg}\n$1/
     or $content =~ s/(\x0D\x0A|\x0D|\x0A)([^ \t]*?\S[^\n]*?)?(\Q$embed_comment\E)/$1$2- $datestr$namestr$form{mymsg}\n$3/
     or $content =~ s/^(\Q$embed_rcomment\E)/- $datestr$namestr$form{mymsg}\n$1/
     or $content =~ s/(\x0D\x0A|\x0D|\x0A)([^ \t]*?\S[^\n]*?)?(\Q$embed_rcomment\E)/$1$2$3\n- $datestr$namestr$form{mymsg}/
    ) {
        &print_error('Comment form does not exist.');
    }

    unless ($content =~ s/^(\Q$embed_comment\E)/- $datestr$namestr$form{mymsg}\n$1/
     or $content =~ s/(\x0D\x0A|\x0D|\x0A)([^ \t]*?\S[^\n]*?)?(\Q$embed_comment\E)/$1$2- $datestr$namestr$form{mymsg}\n$3/
     or $content =~ s/^(\Q$embed_rcomment\E)/$1\n- $datestr$namestr$form{mymsg}/    # ここの置換が違ってた
     or $content =~ s/(\x0D\x0A|\x0D|\x0A)([^ \t]*?\S[^\n]*?)?(\Q$embed_rcomment\E)/$1$2$3\n- $datestr$namestr$form{mymsg}/
    ) {
        &print_error('Comment form does not exist.');
    }

コメントの名前、内容に書く文字列によってコメントが変になるかも(仕様?)

編集
コメントの名前欄に、#comment とか、内容に [[#comment]] と書いてみるとそこにコメントフォームが表示される
これはどうなんでしょうか。
自分で wikiをいじっていて気が付きました。
*のあとに [[#comment]] と書いてみたり...もしました。
[[#rcomment]]

AliasLinkName ページ

編集

リンクの定義部分がエスケープされておらず、
任意のタグがそのまま表示されてしまうようです。
<script> などの危険なタグを書き込まれる可能性があります。-- ぜ

[ [ Test <b>...</b> ] ]
    } elsif ($chunk =~ /^$interwiki_definition$/) {
        #return qq(<span class="InterWiki">$chunk</span>);            # yakty del [XSS fix interwikiname page]
        return qq(<span class="InterWiki">$escapedchunk</span>);      # yakty add [XSS fix interwikiname page]

03528