Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable' into pkgr
Browse files Browse the repository at this point in the history
  • Loading branch information
crohr committed Feb 3, 2018
2 parents 298ed7e + 670450b commit 0623e27
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/validators/email_validator.rb
Expand Up @@ -22,7 +22,7 @@ def self.allowed?(email)

def self.email_in_restriction_setting?(setting, value)
domains = setting.gsub('.', '\.')
regexp = Regexp.new("@(.+\\.)?(#{domains})", true)
regexp = Regexp.new("@(.+\\.)?(#{domains})$", true)
value =~ regexp
end

Expand Down
2 changes: 1 addition & 1 deletion lib/version.rb
Expand Up @@ -4,7 +4,7 @@ module Discourse
module VERSION #:nodoc:
MAJOR = 1
MINOR = 9
TINY = 1
TINY = 2
PRE = nil

STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
Expand Down
1 change: 1 addition & 0 deletions spec/components/validators/email_validator_spec.rb
Expand Up @@ -40,6 +40,7 @@ def blocks?(email)
expect(blocks?('sam@bob.email.com')).to eq(false)
expect(blocks?('sam@e-mail.com')).to eq(true)
expect(blocks?('sam@googlemail.com')).to eq(false)
expect(blocks?('sam@email.computers.are.evil.com')).to eq(true)
end
end

Expand Down

0 comments on commit 0623e27

Please sign in to comment.