Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Don't override, but append object_src

Oliver Günther0b7e3a2d9262
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index cff4751c01b..3af48c93799 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -255,8 +255,7 @@ class RepositoriesController < ApplicationController
end
def stats
- # allow object_src self to be able to load dynamic stats SVGs from ./graph
- override_content_security_policy_directives object_src: %w('self')
+ append_content_security_policy_directives object_src: %w('self') # rubocop:disable Lint/PercentStringArray
@show_commits_per_author = current_user.allowed_in_project?(:view_commit_author_statistics, @project)
end