XSS Security Fix

There  was a XSS vulnerability in the handling of categories. Now they are escaped.
This commit is contained in:
Jacques Distler 2007-09-02 00:33:28 -05:00
parent 6fd6be8fea
commit 5ff1b7f6da
2 changed files with 8 additions and 1 deletions

View file

@ -74,6 +74,13 @@ module Chunk
@content.delete_chunk(self)
end
def html_escape(string)
string.gsub( /&/, "&" ).
gsub( /</, "&lt;" ).
gsub( />/, "&gt;" ).
gsub( /"/, "&quot;" )
end
end
end