Added codefix example for CSS context XSS.

This commit is contained in:
John Poulin
2014-04-08 14:33:38 -04:00
committed by cktricky
parent e760fc0087
commit 5056f77395
3 changed files with 9 additions and 4 deletions
+6 -1
View File
@@ -1,7 +1,7 @@
class ApplicationController < ActionController::Base
before_filter :authenticated, :has_info
helper_method :current_user, :is_admin?
helper_method :current_user, :is_admin?, :sanitize_font
# Our security guy keep talking about sea-surfing, cool story bro.
# protect_from_forgery
@@ -45,4 +45,9 @@ class ApplicationController < ActionController::Base
redirect_to home_dashboard_index_path if redirect
end
def sanitize_font(css)
css
# css if css.match(/\A[0-9]+([\%]|pt)\z/)
end
end