プロジェクト

全般

プロフィール

Vote #71558

未完了

Atom feeds for the Project Activity contain incorrect hostname

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Reopend
優先度:
通常
担当者:
-
カテゴリ:
Feeds_18
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
18
version_id:
0
issue_org_id:
10535
author_id:
52604
assigned_to_id:
332
comments:
8
status_id:
8
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
36
ステータス-->[Reopend]

説明

The link in the Atom feed (at least for Project Activity) contains a hostname detected by Rails, but not the one specified in settings.
This makes link unusable if the requests to Rails are proxified.

Versions:

Redmine:

SVN: http://redmine.rubyforge.org/svn/branches/1.3-stable revision 9240

Env:

Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.1.2
Rails version             2.3.14
Active Record version     2.3.14
Active Resource version   2.3.14
Action Mailer version     2.3.14
Active Support version    2.3.14
Application root          /opt/redmine
Environment               production
Database adapter          mysql
Database schema version   20110902000000

journals

Confirmed the issue. I think the links in the Atom feed should respect @Setting.protocol@ and @Setting.host_name@.

The attached is a workaround for the issue.

--------------------------------------------------------------------------------
Updated tests.
--------------------------------------------------------------------------------
Setting the target version to 4.2.0.
--------------------------------------------------------------------------------
Committed the patch.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
r19810 generates incorrect links if Redmine is deployed using sub-URI.

For example, if @ENV['RAILS_RELATIVE_URL_ROOT']@ is '@/dir@' and @Setting.host_name@ is '@example.net/dir@', a link to an issue will be @http://example.net/dir/dir/issues/1@ ('@dir@' appears twice).

--------------------------------------------------------------------------------
Go MAEDA wrote:
> r19810 generates incorrect links if Redmine is deployed using sub-URI.
>
> For example, if @ENV['RAILS_RELATIVE_URL_ROOT']@ is '@/dir@' and @Setting.host_name@ is '@example.net/dir@', a link to an issue will be @http://example.net/dir/dir/issues/1@ ('@dir@' appears twice).

And also @app/views/journals/index.builder@ should have been changed to support @Setting.host_name@ but r19810 didn't.

I will revert the change.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,17309,RSS feed gives away localhost link

Admin Redmine さんが約2年前に更新

  • カテゴリFeeds_18 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0