aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_model_basics.textile
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2012-06-14 09:35:36 -0700
committerJosé Valim <jose.valim@plataformatec.com.br>2012-06-14 09:35:36 -0700
commit68021d3602245e81b4e604e64f2b19fbf298f3c3 (patch)
treee389b8e3c5993a87e645eea9151ba7472adcfe7b /guides/source/active_model_basics.textile
parent99c9d18601539c7e7e87f26bb047add1f93072af (diff)
parentbc7c0b5c108ef47b24bb91c502429935bb34d214 (diff)
downloadrails-68021d3602245e81b4e604e64f2b19fbf298f3c3.tar.gz
rails-68021d3602245e81b4e604e64f2b19fbf298f3c3.tar.bz2
rails-68021d3602245e81b4e604e64f2b19fbf298f3c3.zip
Merge pull request #6671 from mrbrdo/master
Bad Regexp exploits "fix" master branch
Diffstat (limited to 'guides/source/active_model_basics.textile')
-rw-r--r--guides/source/active_model_basics.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_model_basics.textile b/guides/source/active_model_basics.textile
index d373f4ac85..7cafff2ad8 100644
--- a/guides/source/active_model_basics.textile
+++ b/guides/source/active_model_basics.textile
@@ -187,7 +187,7 @@ class Person
attr_accessor :name, :email, :token
validates :name, :presence => true
- validates_format_of :email, :with => /^([^\s]+)((?:[-a-z0-9]\.)[a-z]{2,})$/i
+ validates_format_of :email, :with => /\A([^\s]+)((?:[-a-z0-9]\.)[a-z]{2,})\z/i
validates! :token, :presence => true
end