summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2025-07-15 09:32:46 +0900
committerGitHub <noreply@github.com>2025-07-15 09:32:46 +0900
commitad7bf096e1d858cddb097fb9b32bfc2387b63894 (patch)
tree28d8191f517fa5154d3f6cc7b4aef7de93448104 /packages
parentDon't remove notes when reply / renote is removed (#16287) (diff)
downloadmisskey-ad7bf096e1d858cddb097fb9b32bfc2387b63894.tar.gz
misskey-ad7bf096e1d858cddb097fb9b32bfc2387b63894.tar.bz2
misskey-ad7bf096e1d858cddb097fb9b32bfc2387b63894.zip
enhance(backend): usernameに対してもprohibitedWordsForNameOfUserを適用 (#16282)
* enhance(backend): usernameに対してもprohibitedWordsForNameOfUserを適用 Resolve #16281 * fix locales/index/d.ts
Diffstat (limited to 'packages')
-rw-r--r--packages/backend/src/core/SignupService.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/backend/src/core/SignupService.ts b/packages/backend/src/core/SignupService.ts
index 5462cb0b13..a85da62b86 100644
--- a/packages/backend/src/core/SignupService.ts
+++ b/packages/backend/src/core/SignupService.ts
@@ -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) =>