プロジェクト

全般

プロフィール

Vote #80220

未完了

Back url parse in validation

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

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
0
version_id:
33
issue_org_id:
31831
author_id:
410375
assigned_to_id:
0
comments:
8
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
151
ステータス-->[New]

説明

Hello,

for example on issues screen, when you apply filters, it generates an url containing:

utf8=✓

Because of this bulk_edit (for instance) is unable to redirect back to this url.
The reason is a function in application_controller.rb - validate_back_url

URI.parse(back_url) is unable to parse the special character mentioned above.

The quicke workaround would be

URI.parse(URI.encode(back_url))

but i am not sure that is sufficient.


journals

It looks good.
I have also suggested the same fix (#31552#note-2).
--------------------------------------------------------------------------------
Oh, ok. Did not see that, I am going to put this isssue to resolved then.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Tibinko H wrote:
> Oh, ok. Did not see that, I am going to put this isssue to resolved then.

It was committed another solution in that ticket.
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> Tibinko H wrote:
> > Oh, ok. Did not see that, I am going to put this isssue to resolved then.
>
> It was committed another solution in that ticket.

Is it not exactly the same as I wrote above?

--------------------------------------------------------------------------------
Tibinko H wrote:
> Oh, ok. Did not see that, I am going to put this isssue to resolved then.
I think this problem has not been solved yet.

Sorry, my comment(#31831#note-1) may have misled you.
In #31552 issue, #31552#note-3 changes were finally committed, not #31552#note-2 changes.
#31552#note-3 changes were a partial fix and does not solve the bulk_edit probrem.

> URI.parse(URI.encode(back_url))
I thought that your suggestion for solving the problem that occurs with bulk_edit is good.
--------------------------------------------------------------------------------
Tibinko H, thank you for reporting this issue.

Here is a diff of your workaround.

<pre><code class="diff">
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 06e2d702c..afbb30f3e 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -440,7 +440,7 @@ class ApplicationController < ActionController::Base
end

begin
- uri = URI.parse(back_url)
+ uri = URI.parse(URI.encode(back_url))
rescue URI::InvalidURIError
return false
end
</code></pre>
--------------------------------------------------------------------------------

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


related_issues

relates,Closed,31552,View switches from gantt to list after editing an issue

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

  • 対象バージョンCandidate for next minor release_33 にセット

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

いいね!0
いいね!0