Compare commits

...

11 Commits

Author SHA1 Message Date
甘瀬ここあ
5665426993
Merge 69e662cd07 into 3c81926f71 2024-12-22 13:58:42 +09:00
かっこかり
3c81926f71
fix(frontend): serverContextの値を利用する条件が間違っていたのを修正 (#15166)
Some checks failed
Test (production install and build) / production (22.11.0) (push) Has been cancelled
Check SPDX-License-Identifier / check-spdx-license-id (push) Has been cancelled
Check copyright year / check_copyright_year (push) Has been cancelled
Publish Docker image (develop) / Build (linux/amd64) (push) Has been cancelled
Publish Docker image (develop) / Build (linux/arm64) (push) Has been cancelled
Dockle / dockle (push) Has been cancelled
Lint / pnpm_install (push) Has been cancelled
Storybook / build (push) Has been cancelled
Test (frontend) / vitest (22.11.0) (push) Has been cancelled
Test (frontend) / e2e (chrome, 22.11.0) (push) Has been cancelled
Publish Docker image (develop) / merge (push) Has been cancelled
Lint / lint (backend) (push) Has been cancelled
Lint / lint (frontend) (push) Has been cancelled
Lint / lint (frontend-embed) (push) Has been cancelled
Lint / lint (frontend-shared) (push) Has been cancelled
Lint / lint (misskey-bubble-game) (push) Has been cancelled
Lint / lint (misskey-js) (push) Has been cancelled
Lint / lint (misskey-reversi) (push) Has been cancelled
Lint / lint (sw) (push) Has been cancelled
Lint / typecheck (backend) (push) Has been cancelled
Lint / typecheck (misskey-js) (push) Has been cancelled
Lint / typecheck (sw) (push) Has been cancelled
2024-12-22 13:36:17 +09:00
甘瀬ここあ
69e662cd07
Merge branch 'develop' into develop 2024-11-23 17:10:25 +09:00
AmaseCocoa
a0868b4b6c Update CHANGELOG.md 2024-11-22 20:18:51 +09:00
AmaseCocoa
600d87db59 Merge remote-tracking branch 'upstream/develop' into develop
Merge branch 'misskey-dev:develop' into develop
2024-11-22 20:15:53 +09:00
AmaseCocoa
3a2922db6f fix(backend): HttpRequestService.tsの変更漏れを修正 (fetch時にデコード済みのurlを参照するように) 2024-11-21 23:02:36 +09:00
AmaseCocoa
545b1c043f Merge branch 'develop' of https://github.com/AmaseCocoa/misskey into develop 2024-11-21 22:54:36 +09:00
AmaseCocoa
e9ee83fccd fix(backend): HttpRequestService.sendでURLをデコードしてからリクエストを送信するように
HttpRequestService側で処理するように変更しました。意図していたものとは異なる可能性もありますが...
2024-11-21 22:54:31 +09:00
甘瀬ここあ
cd642cc791
Merge branch 'misskey-dev:develop' into develop 2024-11-21 22:53:09 +09:00
甘瀬ここあ
c488ba03b7
Merge branch 'misskey-dev:develop' into develop 2024-11-21 15:51:00 +09:00
甘瀬ここあ
edc8d70db0
fix(backend): URLをデコードしてからリクエストを送信するように 2024-11-21 15:45:31 +09:00
6 changed files with 8 additions and 5 deletions

View File

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

View File

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

View File

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

View File

@ -49,7 +49,7 @@ import { genEmbedCode } from '@/scripts/get-embed-code.js';
import { assertServerContext, serverContext } from '@/server-context.js';
// context
const CTX_CLIP = $i && assertServerContext(serverContext, 'clip') ? serverContext.clip : null;
const CTX_CLIP = !$i && assertServerContext(serverContext, 'clip') ? serverContext.clip : null;
const props = defineProps<{
clipId: string,

View File

@ -67,7 +67,7 @@ import { serverContext, assertServerContext } from '@/server-context.js';
import { $i } from '@/account.js';
// context
const CTX_NOTE = $i && assertServerContext(serverContext, 'note') ? serverContext.note : null;
const CTX_NOTE = !$i && assertServerContext(serverContext, 'note') ? serverContext.note : null;
const props = defineProps<{
noteId: string;

View File

@ -54,7 +54,7 @@ const XGallery = defineAsyncComponent(() => import('./gallery.vue'));
const XRaw = defineAsyncComponent(() => import('./raw.vue'));
// context
const CTX_USER = $i && assertServerContext(serverContext, 'user') ? serverContext.user : null;
const CTX_USER = !$i && assertServerContext(serverContext, 'user') ? serverContext.user : null;
const props = withDefaults(defineProps<{
acct: string;