opensource-workshop / connect-cms

コネクトCMS用リポジトリ
https://connect-cms.jp/
MIT License
13 stars 6 forks source link

[新着情報]もっと見るの動作不良 #2010

Closed horitada closed 4 months ago

horitada commented 4 months ago

概要

新着プラグインのもっと見る機能を利用した際にエラー

実行環境

OS: windows10 ブラウザ: Chrome Connect-CMS: 1.11 php version: 8.1

再現手順

WAFを利用し通信がポート443 → WAFからWEBサーバまでの通信がポート80 の場合に発生する。

スクリーンショット

pasted-2024 05 13

akagane99 commented 4 months ago

・相対パスにしたら、動いちゃったりするのかなぁ。(動作確認する環境がないので、あてずっぽうですが。)  → ※ もし相対パスでOKの場合、ディレクトリインストールしたConnectでちゃんと動くか気になる

相対パスに修正

https://github.com/opensource-workshop/connect-cms/blob/master/resources/views/plugins/user/whatsnews/whatsnews_script.blade.php#L64

                axios.get("{{url('/')}}/json/whatsnews/indexJson/{{$page->id}}/{{$frame_id}}?limit=" + this.limit + "&offset=" + this.offset + "&post_detail_length=" + this.post_detail_length)
↓
                axios.get("/json/whatsnews/indexJson/{{$page->id}}/{{$frame_id}}?limit=" + this.limit + "&offset=" + this.offset + "&post_detail_length=" + this.post_detail_length)

WAF対応関連

akagane99 commented 4 months ago

ディレクトリインストールで動くかお試し。 うまくいかなかった。

修正1=NG

https://pre.osws.jp/tmp/ のトップページに新着配置

                axios.get("/json/whatsnews/indexJson/{{$page->id}}/{{$frame_id}}?limit=" + this.limit + "&offset=" + this.offset + "&post_detail_length=" + this.post_detail_length)

NG. ディレクトリ部分が抜けて動かない(https://pre.osws.jp/json/xxx になった) image

修正2=NG

                axios.get("./json/whatsnews/indexJson/{{$page->id}}/{{$frame_id}}?limit=" + this.limit + "&offset=" + this.offset + "&post_detail_length=" + this.post_detail_length)

トップページだと動くけど、階層が変わると動かなくなる

・トップページ=動いた ・階層を深くしたところに新着情報配置=NG

https://pre.osws.jp/tmp/tag/cabinet に新着配置(https://pre.osws.jp/tmp/tag/json/xxx になった。)

image

akagane99 commented 4 months ago

メモ

Connect-CMS: 1.11

バグのConnetバージョンが1.11だった。

末尾/が悪さしていて、v1.14.2 で解消

修正内容 https://github.com/opensource-workshop/connect-cms/commit/296fdf6dfad1af9c6b98c381f72e97906cbba23b

akagane99 commented 4 months ago

v1.14.2で解消済みだった事がわかったので、クローズします。