From: Mikael Nordfeldth Date: Wed, 16 Oct 2013 11:22:43 +0000 (+0200) Subject: Nickname::normalize now checks for path name collision too. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b764ee81345dd33fb255920f1b89bad41f5d3524;p=quix0rs-gnu-social.git Nickname::normalize now checks for path name collision too. --- 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.'); + } +}