You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes relating to GitHub code scanners.
The code scanners reported a bunch of small issues, none
of them critical. Fixes here. Sometimes, it's just
writing the code in a slighly different way.
Copy file name to clipboardExpand all lines: BrainPortal/app/controllers/userfiles_controller.rb
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -370,7 +370,7 @@ def display
370
370
371
371
# No viewer
372
372
if ! @viewer
373
-
render:html=>"<div class=\"warning\">Could not find viewer #{viewer_name}.</div>".html_safe,:status=>"404"
373
+
render:html=>"<div class=\"warning\">Could not find viewer #{ERB::Util.html_escape(viewer_name || '(Unset)')}.</div>".html_safe,:status=>"404"
374
374
return
375
375
end
376
376
@@ -401,7 +401,7 @@ def display
401
401
:description=>"An internal error occurred when trying to display the contents of #{@userfile.name}."
402
402
)
403
403
404
-
render:html=>"<div class=\"warning\">Error generating view code for viewer '#{params[:viewer]}'. Admins have been notified and will look into the problem. In the meantime, there's not much you can do about this.</div>".html_safe
404
+
render:html=>"<div class=\"warning\">Error generating view code for viewer '#{ERB::Util.html_escape(params[:viewer] || '(Unset)')}'. Admins have been notified and will look into the problem. In the meantime, there's not much you can do about this.</div>".html_safe
0 commit comments