From 2c63e0292a0a0a530ce814246bb6762983808135 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 6 Apr 2019 17:53:17 +0200 Subject: Fix admin validation being too strict about usernames (#10449) * Fix admin validation being too strict about usernames Fix #10446 * Strip Setting.site_contact_username consistently throughout the codebase --- app/controllers/home_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/home_controller.rb') diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index b5d6460f9..d1bd0601e 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -50,7 +50,7 @@ class HomeController < ApplicationController push_subscription: current_account.user.web_push_subscription(current_session), current_account: current_account, token: current_session.token, - admin: Account.find_local(Setting.site_contact_username), + admin: Account.find_local(Setting.site_contact_username.strip.gsub(/\A@/, '')), } end -- cgit