Nickname::normalize now checks for path name collision too.
This commit is contained in:
parent
352bef2374
commit
b764ee8134
@ -118,6 +118,9 @@ class Nickname
|
|||||||
if (!self::isCanonical($str)) {
|
if (!self::isCanonical($str)) {
|
||||||
throw new NicknameInvalidException();
|
throw new NicknameInvalidException();
|
||||||
}
|
}
|
||||||
|
if (!User::allowed_nickname($str)) {
|
||||||
|
throw new NicknameBlacklistException();
|
||||||
|
}
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
@ -194,3 +197,12 @@ class NicknameTooLongException extends NicknameInvalidException
|
|||||||
Nickname::MAX_LEN);
|
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.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user