various modifications to prevent xss
- validation of names and labels against /^[\w\s\'\-]*$/i - html entities encoding git-svn-id: http://redmine.rubyforge.org/svn/trunk@99 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -23,7 +23,8 @@ class Tracker < ActiveRecord::Base
|
||||
|
||||
validates_presence_of :name
|
||||
validates_uniqueness_of :name
|
||||
|
||||
validates_format_of :name, :with => /^[\w\s\'\-]*$/i
|
||||
|
||||
private
|
||||
def check_integrity
|
||||
raise "Can't delete tracker" if Issue.find(:first, :conditions => ["tracker_id=?", self.id])
|
||||
|
||||
Reference in New Issue
Block a user