Permalink
Browse files

Merge remote-tracking branch 'origin/stable' into pkgr

  • Loading branch information...
crohr committed Feb 3, 2018
2 parents 298ed7e + 670450b commit 0623e27a11bfdaa47a648c1407bb2278aa8701af
Showing with 3 additions and 2 deletions.
  1. +1 −1 lib/validators/email_validator.rb
  2. +1 −1 lib/version.rb
  3. +1 −0 spec/components/validators/email_validator_spec.rb
@@ -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
View
@@ -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('.')
@@ -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

0 comments on commit 0623e27

Please sign in to comment.