diff options
| author | hukl <contact@smyck.org> | 2009-10-17 13:56:01 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-10-17 13:56:01 +0200 |
| commit | c36132551b62e7d249948712d6dc47be614c28a5 (patch) | |
| tree | 03d259bc98c11defc0ab36e961f1d95d335833e4 /app/helpers | |
| parent | b7c233271b072ba408bfa9e9e8cc6fde7726c558 (diff) | |
added sanitize statements to hopefully all critical templates to protect against cross site scripting.
added section to environment.rb listing the whitelisted tags and attributes and examples on how to extend the list
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/content_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 2eb0c4d..9eb7d7e 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb | |||
| @@ -85,13 +85,13 @@ module ContentHelper | |||
| 85 | 85 | ||
| 86 | options[:partial] = select_partial( options[:partial] ) | 86 | options[:partial] = select_partial( options[:partial] ) |
| 87 | 87 | ||
| 88 | content.sub(tag, render_collection(options)) | 88 | sanitize( content.sub(tag, render_collection(options)) ) |
| 89 | else | 89 | else |
| 90 | content | 90 | sanitize( content ) |
| 91 | end | 91 | end |
| 92 | 92 | ||
| 93 | rescue | 93 | rescue |
| 94 | content | 94 | sanatize( content ) |
| 95 | end | 95 | end |
| 96 | end | 96 | end |
| 97 | 97 | ||
