mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
108963480-changed_construction
This commit is contained in:
parent
76e2152cce
commit
2dfb1e50b0
1 changed files with 5 additions and 3 deletions
|
@ -227,9 +227,11 @@ class Contact < ActiveRecord::Base
|
||||||
next unless column.type == :string
|
next unless column.type == :string
|
||||||
|
|
||||||
c_name = column.name
|
c_name = column.name
|
||||||
val = read_atribute(c_name)
|
val = read_attribute(c_name)
|
||||||
errors.add(c_name, :invalid) if val.include?('<') || val.include?('>') || val.include?('%3C') || val.include?('%3E')
|
if val && (val.include?('<') || val.include?('>') || val.include?('%3C') || val.include?('%3E'))
|
||||||
return
|
errors.add(c_name, :invalid)
|
||||||
|
return # want to run code faster
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue