Skip to content

Commit

Permalink
Fix bug preventing the inactive-user user to reset their password (lo…
Browse files Browse the repository at this point in the history
…bsters#725)

Fix lobsters#721

The validation *validates_each :username* caused actions touching
inactive-user like password resets to throw 500s and db:seed to fail.
  • Loading branch information
arandomandy authored and pushcx committed Aug 21, 2019
1 parent be1bec2 commit 791b21f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/login_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def reset_password
end

if @found_user.is_wiped?
flash.now[:error] = "It's not possible to reest your password " <<
flash.now[:error] = "It's not possible to reset your password " <<
"because your account was deleted before the site changed admins " <<
"and your email address was wiped for privacy."
return forgot_password
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class User < ApplicationRecord
end

BANNED_USERNAMES = ["admin", "administrator", "contact", "fraud", "guest",
"help", "hostmaster", "inactive-user", "lobster", "lobsters", "mailer-daemon", "moderator",
"help", "hostmaster", "lobster", "lobsters", "mailer-daemon", "moderator",
"moderators", "nobody", "postmaster", "root", "security", "support",
"sysop", "webmaster", "enable", "new", "signup",].freeze

Expand Down

0 comments on commit 791b21f

Please sign in to comment.