fix XSS vunerability. Thanks Mesut Timur for spotting this!

This commit is contained in:
Reinier Balt 2011-03-11 15:14:45 +01:00
parent 13b5ac98df
commit 11edf64d43

View file

@ -417,7 +417,7 @@ class TodosController < ApplicationController
# /todos/tag/[tag_name] shows all the actions tagged with tag_name # /todos/tag/[tag_name] shows all the actions tagged with tag_name
def tag def tag
@source_view = params['_source_view'] || 'tag' @source_view = params['_source_view'] || 'tag'
@tag_name = params[:name] @tag_name = sanitize(params[:name])
@page_title = "TRACKS::Tagged with \'#{@tag_name}\'" @page_title = "TRACKS::Tagged with \'#{@tag_name}\'"
# mobile tags are routed with :name ending on .m. So we need to chomp it # mobile tags are routed with :name ending on .m. So we need to chomp it