プロジェクト

全般

プロフィール

Vote #74834

完了

Redirect to back_url or referer when clicking "Sign in" while already logged-in

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

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

0%

予定工数:
category_id:
7
version_id:
75
issue_org_id:
15926
author_id:
43448
assigned_to_id:
1
comments:
1
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I subscribe to my activity view via activity.atom (using feedly). Links to e.g. wiki pages or commits are in the form https://my.site/redmine/login?back_url=https%3A%2F%2Fmy.site%2Fredmine%2Fprojects%2Fmyproject%2Frepository%2Frevisions%2F3hash

I work in the 2.4-stable branch, but looking at the code it seems that trunk has the same issue.

Bug:
When clicking on these links (or pasting them to the browser), accounts#login is executed. If I am already logged in, this executes @redirect_to home_url@ (app/controllers/account_controller.rb:37) and I end up on the Redmine start page (/redmine). The @back_url@ parameter is ignored.

Solution:

Index: app/controllers/account_controller.rb

--- app/controllers/account_controller.rb (revision 12689)
+++ app/controllers/account_controller.rb (working copy)
@@ -34,7 +34,7 @@
def login
if request.get?
if User.current.logged?

  • redirect_to home_url
  • redirect_back_or_default home_url end else authenticate_user

journals

Feature added in r12705.
--------------------------------------------------------------------------------

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

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

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

いいね!0
いいね!0