mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
fix: resolve with non-lowercased acct is broken (#15813)
* fix: resolve with non-lowercased acct is broken * docs(changelog): Fix: 大文字を含むユーザの URL で紹介された場合に 404 エラーを返す問題
This commit is contained in:
parent
f7195d54d0
commit
4c473eb76d
6 changed files with 8 additions and 8 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
### Server
|
||||
- Fix: システムアカウントの名前がサーバー名と同期されない問題を修正
|
||||
|
||||
- Fix: 大文字を含むユーザの URL で紹介された場合に 404 エラーを返す問題 #15813
|
||||
|
||||
## 2025.4.0
|
||||
|
||||
|
|
|
@ -735,7 +735,7 @@ export class ActivityPubServerService {
|
|||
const acct = Acct.parse(request.params.acct);
|
||||
|
||||
const user = await this.usersRepository.findOneBy({
|
||||
usernameLower: acct.username,
|
||||
usernameLower: acct.username.toLowerCase(),
|
||||
host: acct.host ?? IsNull(),
|
||||
isSuspended: false,
|
||||
});
|
||||
|
|
|
@ -138,7 +138,7 @@ fastify.get('/.well-known/change-password', async (request, reply) => {
|
|||
|
||||
const fromAcct = (acct: Acct.Acct): FindOptionsWhere<MiUser> | number =>
|
||||
!acct.host || acct.host === this.config.host.toLowerCase() ? {
|
||||
usernameLower: acct.username,
|
||||
usernameLower: acct.username.toLowerCase(),
|
||||
host: IsNull(),
|
||||
isSuspended: false,
|
||||
} : 422;
|
||||
|
|
|
@ -44,7 +44,7 @@ describe('AnnouncementService', () => {
|
|||
return usersRepository.insert({
|
||||
id: genAidx(Date.now()),
|
||||
username: un,
|
||||
usernameLower: un,
|
||||
usernameLower: un.toLowerCase(),
|
||||
...data,
|
||||
})
|
||||
.then(x => usersRepository.findOneByOrFail(x.identifiers[0]));
|
||||
|
|
|
@ -115,7 +115,7 @@ describe('SigninWithPasskeyApiService', () => {
|
|||
jest.spyOn(webAuthnService, 'verifySignInWithPasskeyAuthentication').mockImplementation(FakeWebauthnVerify);
|
||||
|
||||
const dummyUser = {
|
||||
id: uid, username: uid, usernameLower: uid.toLocaleLowerCase(), uri: null, host: null,
|
||||
id: uid, username: uid, usernameLower: uid.toLowerCase(), uri: null, host: null,
|
||||
};
|
||||
const dummyProfile = {
|
||||
userId: uid,
|
||||
|
|
|
@ -74,7 +74,7 @@ describe('UserEntityService', () => {
|
|||
...userData,
|
||||
id: genAidx(Date.now()),
|
||||
username: un,
|
||||
usernameLower: un,
|
||||
usernameLower: un.toLowerCase(),
|
||||
})
|
||||
.then(x => usersRepository.findOneByOrFail(x.identifiers[0]));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue