diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 52bf9149ee2..ce702131151 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -2095,7 +2095,7 @@ class User < ApplicationRecord end def check_username_format - return if username.blank? || Mime::EXTENSION_LOOKUP.keys.none? { |type| username.end_with?(type) } + return if username.blank? || Mime::EXTENSION_LOOKUP.keys.none? { |type| username.end_with?(".#{type}") } errors.add(:username, _('ending with MIME type format is not allowed.')) end |