Project

General

Profile

Actions

QA #1227

open

Redmine4.2にて、複数の引数付きのimage_url表示が機能しなくなった

Added by 奈良 裕記 over 2 years ago. Updated over 2 years ago.

Status:
新規
Priority:
通常
Assignee:
-
Category:
-
Target version:
-
Start date:
04/26/2021
Due date:
% Done:

0%

Estimated time:

Description

■現象/要望

Redmine4.2にて、複数の引数付きのimage_url表示が機能しなくなった(&で複数引数を渡している場合のみ動作しない)
Matomoなどのアクセスログ解析にて、イメージトラッカーコードとして引数付きの画像URL利用する場合、
4.2ではその画像のアクセスが行われず、元のイメージタグが表示される。


!https://unofficial-redmine.org/matomo/matomo.png?idsite=1&rec=1208!

■解決策

調査中

下記が関連すると思われる。
lib/redmine/wiki_formatting/textile/redcloth3.rb
def inline_textile_image( text )
def to_html

下記のSEC修正にて発生した可能性がある。
(SEC修正のため表示不可) https://www.redmine.org/issues/32934

https://github.com/redmine/redmine/commit/895fc12d56c17a9f125e9ad591656281c5fda908#diff-7fd35a152b4d6f80a5c756100ef0ab7435852c04a2c473e9d8d0b016203b5a33
HOW DO I ENABLE TRACKING FOR VISITORS WHEN JAVASCRIPT CANNOT BE USED ON A PAGE (OR FOR VISITORS THAT HAVE DISABLED JAVASCRIPT)?
https://matomo.org/faq/how-to/faq_176/

下記のrecとidsiteの両方が無いと、Matomo側は記録しない仕様の模様

The following parameters can also be passed to the image URL:
rec – (required) The parameter &rec=1 is required to force the request to be recorded
idsite – (required) Defines the Website ID being tracked

途中に半角の&が存在すると、イメージタグとみなされず、テキストで表示される?

テキスト表示される
!https://unofficial-redmine.org/matomo/matomo.php?rec=1227!

テキスト表示されない。idsiteが無いとmatomo側に記録されない仕様

!https://unofficial-redmine.org/matomo/matomo.php?rec=1227! 
!https://unofficial-redmine.org/matomo/matomo.php?idsite=1&rec=1227! 

■対応状況

unofficialcooking分については、サーバ内のMatomo側ソースを変更し、idsite=1を常時指定された状態にすることで、recだけの指定でも記録させることで暫定対応した。
自サイトならimagetagの利用など不要で、所詮手元の環境が動作すれば良い訳で。。

matomoの変更点
core/Tracker/Request.php getIdSiteUnverified() にて、強制的に1を返すだけで対応できた。

    public function getIdSiteUnverified()
    {
        /* $idSite = Common::getRequestVar('idsite', 0, 'int', $this->params); */
        $idSite = 1;

■補足

Actions #1

Updated by 奈良 裕記 over 2 years ago

  • Description updated (diff)
Actions #2

Updated by 奈良 裕記 over 2 years ago

  • Description updated (diff)
Actions #3

Updated by 奈良 裕記 over 2 years ago

  • Description updated (diff)
Actions #4

Updated by 奈良 裕記 over 2 years ago

  • Description updated (diff)
Actions #5

Updated by 奈良 裕記 over 2 years ago

  • Description updated (diff)
Actions #6

Updated by 奈良 裕記 over 2 years ago

  • Description updated (diff)
Actions #7

Updated by 奈良 裕記 over 2 years ago

  • Description updated (diff)
Actions #8

Updated by 奈良 裕記 over 2 years ago

  • Description updated (diff)
Actions #9

Updated by 奈良 裕記 over 2 years ago

  • Subject changed from Redmine4.2にて、引数付きのimage_url表示が機能しなくなった to Redmine4.2にて、複数の引数付きのimage_url表示が機能しなくなった
  • Description updated (diff)
Actions #10

Updated by 奈良 裕記 over 2 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF