@@ -84,7 +84,7 @@ This Ruby Regex specialty can have security impact, as often regular expressions
...
@@ -84,7 +84,7 @@ This Ruby Regex specialty can have security impact, as often regular expressions
GitLab specific examples can be found [here](https://gitlab.com/gitlab-org/gitlab/-/issues/36029#note_251262187) and [there](https://gitlab.com/gitlab-org/gitlab/-/issues/33569).
GitLab specific examples can be found [here](https://gitlab.com/gitlab-org/gitlab/-/issues/36029#note_251262187) and [there](https://gitlab.com/gitlab-org/gitlab/-/issues/33569).
Another example would be this fictional Ruby On Rails controller:
Another example would be this fictional Ruby on Rails controller:
```ruby
```ruby
classPingController<ApplicationController
classPingController<ApplicationController
...
@@ -127,9 +127,9 @@ class Email < ApplicationRecord
...
@@ -127,9 +127,9 @@ class Email < ApplicationRecord
DOMAIN_MATCH=Regexp.new('([a-zA-Z0-9]+)+\.com')
DOMAIN_MATCH=Regexp.new('([a-zA-Z0-9]+)+\.com')
validates:domain_matches
validates:domain_matches
private
private
defdomain_matches
defdomain_matches
errors.add(:email,'does not match')ifemail=~DOMAIN_MATCH
errors.add(:email,'does not match')ifemail=~DOMAIN_MATCH