Project

General

Profile

Actions

Defect #32891

closed

Bookmark link on project page should not use full path with hostname

Added by Dmitry Makurin about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Projects
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Currently bookmark url creating with default protocol. If rails server setup with secure protocol bookmarks link still creating with http.
Jquery raises error on that kind of links:

jquery-2.2.4-ui-1.11.0-ujs-5.2.3.js?1574665137:24 Mixed Content: The page at 'https://redmine/projects/1' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://redmine/projects/1/bookmark'. This request has been blocked; the content must be served over HTTPS.

Redmine provides an option to specify protocol in administration panel. It could be used to generate url:

--- app/helpers/projects_helper.rb    (revision 1e830ee09f28f68d9019590e72b3612950724253)
+++ app/helpers/projects_helper.rb    (revision 24843626abc3f32e8fe206689e8d3d728e610a50)
@@ -158,7 +158,7 @@
       method = "post" 
       text = l(:button_project_bookmark)
     end
-    url = bookmark_project_url(project)
+    url = bookmark_project_url(project, :protocol => Setting.protocol)
     link_to text, url, remote: true, method: method, class: css
   end
Actions #1

Updated by Dmitry Makurin about 4 years ago

I messed up with title a little bit. Bookmark link on project page.

Actions #2

Updated by Marius BĂLTEANU about 4 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 4.1.1

r19530 should fix this issue.

Actions #3

Updated by Marius BĂLTEANU about 4 years ago

  • Subject changed from Bookmark link in project jump box to Bookmark link on project page
Actions #4

Updated by Go MAEDA about 4 years ago

  • Category set to Projects
Actions #5

Updated by Jean-Philippe Lang almost 4 years ago

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

Merged.

Actions #6

Updated by Jean-Philippe Lang almost 4 years ago

  • Subject changed from Bookmark link on project page to Bookmark link on project page should not use full path with hostname
Actions

Also available in: Atom PDF