プロジェクト

全般

プロフィール

Vote #63795

完了

back_url entry becomes urlencoded

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

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

0%

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

説明

I just updated my test install to the latest SVN version and noticed that back_url containd %2fredmine%2f instead of /redmine/. I had also done some apache configuration changes so I'm not sure if this was due to the Redmine update or my changes. Anyhow, I did verify that if back_url gets urlencoded, the call to redirect_to is going to result in getting directed to an invalid URL.

I'm not sure of the 'right' way to handle this -- I believe you need to either make sure it does not become urlencoded in the first place, or at least make sure the redirect_to call urldecodes it first.

On my test install I did a quick hack to add in a CGI::unescape() call inside the redirect_to call and it does work, but I'm not sure if that is the "best" way or not. I'll leave that decision to the people in charge. :)


journals

I could not reproduce this problem. What's your Rails version and browser?
Anyway, I've added a call to @CGI.unescape@ in @ApplicationController#redirect_back_or_default@ that should solve this problem (r1893).
--------------------------------------------------------------------------------
I'm using Rails 2.1.0 and Firefox 3.0.1. This behavior did not show up until I had reconfigured apache to use a <Location> block for redmine rewriting it to a redmine_cluster w/mongrel_cluster. Everything worked as expected, other than the back_url suddenly getting urlencoded like I mentioned.

Having run this with my changes, which are basically the same that you did, for a couple weeks now, everything looks good now.

Thanks!

--------------------------------------------------------------------------------
Thanks for the feedback.
--------------------------------------------------------------------------------

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

  • 対象バージョン0.8_2 にセット

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

いいね!0
いいね!0