Add username_regex to allow change username restriction
@ -121,5 +121,6 @@
"type": "like-google-fonts",
"url": "https://fonts.loli.net"
},
"no_cdn": false
"no_cdn": false,
"username_regex": "^[a-zA-Z0-9\\-\\_]+$"
}
@ -255,7 +255,7 @@ module.exports = {
return md5.digest('hex');
isValidUsername(s) {
return /^[a-zA-Z0-9\-\_]+$/.test(s);
return RegExp(syzoj.config.username_regex).test(s);
locks: [],
lock(key, cb) {