This commit is contained in:
甘瀬ここあ 2024-12-22 13:58:42 +09:00 committed by GitHub
commit 5665426993
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View File

@ -15,6 +15,7 @@
- Fix: 絵文字管理画面で一部の絵文字が表示されない問題を修正 - Fix: 絵文字管理画面で一部の絵文字が表示されない問題を修正
### Server ### Server
- Fix: URLをデコードしてからリクエストを送信するように
- Fix: ユーザーのプロフィール画面をアドレス入力などで直接表示した際に概要タブの描画に失敗する問題の修正( #15032 ) - Fix: ユーザーのプロフィール画面をアドレス入力などで直接表示した際に概要タブの描画に失敗する問題の修正( #15032 )
- Fix: 起動前の疎通チェックが機能しなくなっていた問題を修正 - Fix: 起動前の疎通チェックが機能しなくなっていた問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/737) (Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/737)

View File

@ -283,6 +283,7 @@ export class HttpRequestService {
}, },
): Promise<Response> { ): Promise<Response> {
const timeout = args.timeout ?? 5000; const timeout = args.timeout ?? 5000;
const decodedUrl = decodeURIComponent(url);
const controller = new AbortController(); const controller = new AbortController();
setTimeout(() => { setTimeout(() => {
@ -291,7 +292,7 @@ export class HttpRequestService {
const isLocalAddressAllowed = args.isLocalAddressAllowed ?? false; const isLocalAddressAllowed = args.isLocalAddressAllowed ?? false;
const res = await fetch(url, { const res = await fetch(decodedUrl, {
method: args.method ?? 'GET', method: args.method ?? 'GET',
headers: { headers: {
'User-Agent': this.config.userAgent, 'User-Agent': this.config.userAgent,
@ -299,7 +300,7 @@ export class HttpRequestService {
}, },
body: args.body, body: args.body,
size: args.size ?? 10 * 1024 * 1024, size: args.size ?? 10 * 1024 * 1024,
agent: (url) => this.getAgentByUrl(url, false, isLocalAddressAllowed), agent: (decodedUrl) => this.getAgentByUrl(decodedUrl, false, isLocalAddressAllowed),
signal: controller.signal, signal: controller.signal,
}); });

View File

@ -7,6 +7,7 @@ import Parser from 'rss-parser';
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js'; import { Endpoint } from '@/server/api/endpoint-base.js';
import { HttpRequestService } from '@/core/HttpRequestService.js'; import { HttpRequestService } from '@/core/HttpRequestService.js';
import { URL } from 'url';
const rssParser = new Parser(); const rssParser = new Parser();