プロジェクト

全般

プロフィール

Vote #76890

完了

Use config.relative_url_root as the default path for session and autologin cookies

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

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

0%

予定工数:
category_id:
7
version_id:
102
issue_org_id:
21169
author_id:
48958
assigned_to_id:
1
comments:
7
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Per default, Rails uses "/" as path in session cookies. When mounting
Redmine on a relative URL root, say '/redmine', the path in the cookie
should also say "/redmine". Otherwise a browsers sendsi the cookie to
all applications running on the same host. This is problematic when
running more than one Redmine instance on one server.

Fix it by setting the cookie path to config.relative_url_root when set,
"/" otherwise. Rails automatically sets this config from the environment
variable RAILS_RELATIVE_URL_ROOT.

Related to Patch #3968


journals

--------------------------------------------------------------------------------
Thanks for pointing out the autologin cookie. Didn't notice it since I had it disabled.

I think it would make sense to use RAILS_RELATIVE_URL_ROOT for the autologin cookie too, but only as default value instead of "/". When autologin_cookie_path is set, that one should be used instead. Does that sound reasonable?
--------------------------------------------------------------------------------
v2 of the patch with fix for autologin cookie path.
--------------------------------------------------------------------------------
Also related to #14237.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------

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


related_issues

relates,Closed,16489,Autologin Cookie doesn't differentiate between different Redmine systems within the same browser
relates,Closed,14237,Allow custom path for "_redmine_session_" cookie

Admin Redmine さんが3年以上前に更新

  • カテゴリAccounts / authentication_7 にセット
  • 対象バージョン3.2.0_102 にセット

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

いいね!0
いいね!0