From e8b8ef394b0bfb9a0798f43e282804c6b29390f8 Mon Sep 17 00:00:00 2001 From: Daniel Schalla Date: Mon, 9 Jul 2018 12:45:48 +0200 Subject: Blacklist System as Username (#9060) adapted tests --- model/user.go | 1 + model/user_test.go | 1 + 2 files changed, 2 insertions(+) (limited to 'model') diff --git a/model/user.go b/model/user.go index c5d6c13b6..e56f3aaed 100644 --- a/model/user.go +++ b/model/user.go @@ -565,6 +565,7 @@ var restrictedUsernames = []string{ "all", "channel", "matterbot", + "system", } func IsValidUsername(s string) bool { diff --git a/model/user_test.go b/model/user_test.go index 645eaadff..a1953a40d 100644 --- a/model/user_test.go +++ b/model/user_test.go @@ -272,6 +272,7 @@ var usernames = []struct { {"spin'punch", false}, {"spin*punch", false}, {"all", false}, + {"system", false}, } func TestValidUsername(t *testing.T) { -- cgit v1.2.3-1-g7c22