Skip to content

Commit 0623e27

Browse files
committed
Merge remote-tracking branch 'origin/stable' into pkgr
2 parents 298ed7e + 670450b commit 0623e27

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

lib/validators/email_validator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def self.allowed?(email)
2222

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

lib/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Discourse
44
module VERSION #:nodoc:
55
MAJOR = 1
66
MINOR = 9
7-
TINY = 1
7+
TINY = 2
88
PRE = nil
99

1010
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')

spec/components/validators/email_validator_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def blocks?(email)
4040
expect(blocks?('sam@bob.email.com')).to eq(false)
4141
expect(blocks?('sam@e-mail.com')).to eq(true)
4242
expect(blocks?('sam@googlemail.com')).to eq(false)
43+
expect(blocks?('sam@email.computers.are.evil.com')).to eq(true)
4344
end
4445
end
4546

0 commit comments

Comments
 (0)