Defect #31552

View switches from gantt to list after editing an issue

Added by Bernhard Rohloff 2 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Gantt
Target version:4.0.5
Resolution:Fixed Affected version:

Description

The view is only affected if a custom filter is applied. If there's
no filter applied the view works as expected.

Steps to reproduce

  1. Open the gantt view.
  2. Modify and apply the filter.
  3. Edit an issue with the right click menu

Result

The view switches to the issues list view

Expected result

The view stays on the gantt view

gantt_switch_to_list_issue.webm - Video showing the behavior with and without custom filter (179 KB) Bernhard Rohloff, 2019-06-11 11:52

add-back-url-parameter.patch Magnifier (1.41 KB) Mizuki ISHIKAWA, 2019-06-27 09:09


Related issues

Related to Redmine - Defect #31831: Back url parse in validation New

Associated revisions

Revision 18322
Added by Go MAEDA about 1 month ago

View switches from gantt to list after editing an issue (#31552).

Patch by Mizuki ISHIKAWA.

Revision 18324
Added by Go MAEDA about 1 month ago

Merged r18322 from trunk to 4.0-stable (#31552).

History

#1 Updated by Go MAEDA 2 months ago

  • Status changed from New to Confirmed

#2 Updated by Mizuki ISHIKAWA about 1 month ago

I have confirmed that the changes below fix this problem.

diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 06e2d702c1..afbb30f3ee 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

However, I am concerned that this change will cause other problems.
ApplicationController#validate_back_url is a method that includes security changes(#19577), so it needs to be corrected carefully.

#3 Updated by Mizuki ISHIKAWA about 1 month ago

I think that the patch attached is better than the correction method suggested in #31552#note-2.

The issues/_list also make the back_url parameter in the same way.
The same problem occurred with the calendar, so we fix it together.

#4 Updated by Go MAEDA about 1 month ago

  • Target version set to 4.0.5

Mizuki ISHIKAWA wrote:

The issues/_list also make the back_url parameter in the same way.

source:tags/4.0.4/app/views/issues/_list.html.erb#L5 and source:tags/4.0.4/app/views/timelog/_list.html.erb#L2.

Setting the target version to 4.0.5.

#5 Updated by Go MAEDA about 1 month ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA

Committed the patch. Thank you all for reporting and fixing this issue.

#6 Updated by Go MAEDA about 1 month ago

  • Status changed from Resolved to Closed
  • Resolution set to Fixed

#7 Updated by Go MAEDA 16 days ago

Also available in: Atom PDF