From b764ee81345dd33fb255920f1b89bad41f5d3524 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 16 Oct 2013 13:22:43 +0200 Subject: [PATCH] Nickname::normalize now checks for path name collision too. --- lib/nickname.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/nickname.php b/lib/nickname.php index 4d3795e392..e05e58c83b 100644 --- a/lib/nickname.php +++ b/lib/nickname.php @@ -118,6 +118,9 @@ class Nickname if (!self::isCanonical($str)) { throw new NicknameInvalidException(); } + if (!User::allowed_nickname($str)) { + throw new NicknameBlacklistException(); + } return $str; } @@ -194,3 +197,12 @@ class NicknameTooLongException extends NicknameInvalidException Nickname::MAX_LEN); } } + +class NicknameBlacklistException extends NicknameInvalidException +{ + protected function defaultMessage() + { + // TRANS: Validation error in form for registration, profile and group settings, etc. + return _('Nickname is disallowed through blacklist or system path list.'); + } +} -- 2.39.5