Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
a73f32f7
Commit
a73f32f7
authored
3 years ago
by
Eugen Rochko
Browse files
Options
Download
Email Patches
Plain Diff
Fix being able to bypass e-mail restrictions
parent
637c7d46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/user.rb
+2
-2
app/models/user.rb
with
2 additions
and
2 deletions
+2
-2
app/models/user.rb
+
2
-
2
View file @
a73f32f7
...
...
@@ -86,11 +86,11 @@ class User < ApplicationRecord
validates
:invite_request
,
presence:
true
,
on: :create
,
if: :invite_text_required?
validates
:locale
,
inclusion:
I18n
.
available_locales
.
map
(
&
:to_s
),
if: :locale?
validates_with
BlacklistedEmailValidator
,
on: :create
validates_with
BlacklistedEmailValidator
,
if:
->
{
!
confirmed?
}
validates_with
EmailMxValidator
,
if: :validate_email_dns?
validates
:agreement
,
acceptance:
{
allow_nil:
false
,
accept:
[
true
,
'true'
,
'1'
]
},
on: :create
#
Those are h
oneypot/antispam fields
#
H
oneypot/anti
-
spam fields
attr_accessor
:registration_form_time
,
:website
,
:confirm_password
validates_with
RegistrationFormTimeValidator
,
on: :create
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment