1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-03 09:06:17 +02:00

enhance(backend): usernameに対してもprohibitedWordsForNameOfUserを適用 (#16282)

* enhance(backend): usernameに対してもprohibitedWordsForNameOfUserを適用
Resolve #16281

* fix locales/index/d.ts
This commit is contained in:
tamaina
2025-07-15 09:32:46 +09:00
committed by GitHub
parent 08cc5a99bb
commit ad7bf096e1
3 changed files with 7 additions and 2 deletions

View File

@@ -93,6 +93,11 @@ export class SignupService {
if (isPreserved) {
throw new Error('USED_USERNAME');
}
const hasProhibitedWords = this.utilityService.isKeyWordIncluded(username.toLowerCase(), this.meta.prohibitedWordsForNameOfUser);
if (hasProhibitedWords) {
throw new Error('USED_USERNAME');
}
}
const keyPair = await new Promise<string[]>((res, rej) =>