Reject guest names matching the reserved usernames regex
This commit is contained in:
parent
90b5e5e09f
commit
3413c3bdaa
2 changed files with 18 additions and 0 deletions
|
|
@ -190,6 +190,11 @@ function handleRegister(req, res) {
|
|||
}
|
||||
|
||||
if (name.match(Config.get("reserved-names.usernames"))) {
|
||||
LOGGER.warn(
|
||||
'Rejecting attempt by %s to register reserved username "%s"',
|
||||
ip,
|
||||
name
|
||||
);
|
||||
sendPug(res, "register", {
|
||||
registerError: "That username is reserved"
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue