fix: using whitelist

This commit is contained in:
オスカー、 2024-02-03 16:32:56 +09:00 committed by GitHub
parent 76415061b7
commit 0a61a9bc33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -180,7 +180,7 @@ router.get('(.*)', async (ctx) => {
async function login(ctx: Context, user: Record<string, unknown>, host: string, token: string) {
const isNewcomer = !(await getUser(user.username as string, host));
if (isNewcomer) {
if (isNewcomer && config.whitelist && !config.instances.includes(host)) {
await die(ctx, 'noNewUserAllowed', 403);
return;
}