From 505a263c3579784ae9af7aa1d81aaaedfbfeda96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 26 May 2014 15:58:51 -0300 Subject: Escape user input before showing in the page. This is not a security issue since this page is not present in production and user have to type something in the field but is better to escape the input. --- .../lib/action_dispatch/middleware/templates/routes/_table.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb index cce0d75af4..6ffa242da4 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb @@ -148,8 +148,8 @@ // On key press perform a search for matching paths searchElem.onkeyup = function(e){ var userInput = searchElem.value, - defaultExactMatch = 'Paths Matching (' + sanitizePath(userInput) +'):', - defaultFuzzyMatch = 'Paths Containing (' + userInput +'):', + defaultExactMatch = 'Paths Matching (' + escape(sanitizePath(userInput)) +'):', + defaultFuzzyMatch = 'Paths Containing (' + escape(userInput) +'):', noExactMatch = 'No Exact Matches Found', noFuzzyMatch = 'No Fuzzy Matches Found'; -- cgit v1.2.3