Skip to content

Commit ec43eed

Browse files
authored
Merge pull request #113 from JGallot/master
Prevents XSS injection through wrong url path
2 parents 37c17b2 + c8ea37a commit ec43eed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/redmine_view_customize/view_hook.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RedmineViewCustomize
44
class ViewHook < Redmine::Hook::ViewListener
55
def view_layouts_base_html_head(context={})
6-
path = Redmine::CodesetUtil.replace_invalid_utf8(context[:request].path_info);
6+
path = sanitize(Redmine::CodesetUtil.replace_invalid_utf8(context[:request].path_info));
77

88
html = "\n<!-- [view customize plugin] path:#{path} -->\n"
99
html << stylesheet_link_tag("view_customize", plugin: "view_customize")

0 commit comments

Comments
 (0)