Sha256: e3108575d4651158615ca549f743b44783fbfafc5448f33f39f66c1f297fbaa6
Contents?: true
Size: 457 Bytes
Versions: 42
Compression:
Stored size: 457 Bytes
Contents
class CmsSnippet < ActiveRecord::Base acts_as_versioned attr_accessible :name, :content def content=(value) if value && value.is_a?(String) # filter suspicious content... go overboard for now, fine-tune later perhaps value.gsub!(/<(%.*?(exec|system)\s?\(.*?\s*%)>/, '<\1>') value.gsub!(/<(%.*?\%x\s?\[.*?\s*%)>/, '<\1>') value.gsub!(/<(%.*?`.*?\s*%)>/, '<\1>') end super(value) end end
Version data entries
42 entries across 42 versions & 1 rubygems