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