summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/web/UrlPreviewService.ts (follow)
Commit message (Collapse)AuthorAgeFilesLines
* perf(backend): lazy load summalysyuilo2025-11-301-3/+4
|
* enhance(backend): 外部サイトのOGPのキャッシュ期間を調整syuilo2025-05-291-2/+2
|
* feat: ↵おさむのひと2025-05-271-1/+2
| | | | | | | | | URLプレビューのリダイレクトを受け入れるかどうかを設定できるようにする (#16112) * feat: URLプレビューのリダイレクトを受け入れるかどうかを設定できるようにする * fix CHANGELOG.md * fix lang
* Merge commit from forkJulia2025-04-291-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SP-2025-03.1 always wrap icon&thumbnail URLs if they're not HTTP URLs, the frontend won't be able to display them anyway (`<img src="mailto:…">` or '<div stile="background-image: url(nntp:…)">` aren't going to work!), so let's always run them through the media proxy, which will fail harder (fetching a `javascript:` URL won't do anything in the backend, might do something in the frontend) and will always protect the client's address in cases like `gemini:` where the browser could try to fetch * SP-2025-03.2 use object binding for more styles interpolating a random (remote-controlled!) string into a `style` attribute is a bad idea; using VueJS object binding, we should get proper quoting and therefore safe parse failures instead of CSS injections / XSS * SP-2025-03.3 slightly more robust "self" URL handling parse URLs instead of treating them as strings; this is still not perfect, but the `URL` class only handles full URLs, not relative ones, so there's so way to ask it "give me a URL object that represents this resource relative to this base URL" notice that passing very weird URLs to `MkUrl` and `MkUrlPreview` will break the frontend (in dev mode) because there's an untrapped `new URL(…)` that may explode; production builds seem to safely ignore the error, though --------- Co-authored-by: dakkar <dakkar@thenautilus.net>
* Merge commit from forkrectcoordsystem2024-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | * fix(backend): check target IP before sending HTTP request * fix(backend): allow accessing private IP when testing * Apply suggestions from code review Co-authored-by: anatawa12 <anatawa12@icloud.com> * fix(backend): lint and typecheck * fix(backend): add isLocalAddressAllowed option to getAgentByUrl and send (HttpRequestService) * fix(backend): allow fetchSummaryFromProxy, trueMail to access local addresses --------- Co-authored-by: anatawa12 <anatawa12@icloud.com> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
* refactor/perf(backend): provide metadata statically (#14601)syuilo2024-09-221-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * wip * Update ReactionService.ts * Update ApiCallService.ts * Update timeline.ts * Update GlobalModule.ts * Update GlobalModule.ts * Update NoteEntityService.ts * wip * wip * wip * Update ApPersonService.ts * wip * Update GlobalModule.ts * Update mock-resolver.ts * Update RoleService.ts * Update activitypub.ts * Update activitypub.ts * Update activitypub.ts * Update activitypub.ts * Update activitypub.ts * clean up * Update utils.ts * Update UtilityService.ts * Revert "Update utils.ts" This reverts commit a27d4be764b78c1b5a9eac685e261fee49331d89. * Revert "Update UtilityService.ts" This reverts commit e5fd9e004c482cf099252201c0c1aa888e001430. * vuwa- * Revert "vuwa-" This reverts commit 0c3bd12472b4b9938cdff2d6f131e6800bc3724c. * Update entry.ts * Update entry.ts * Update entry.ts * Update entry.ts * Update jest.setup.ts
* fix: URLプレビューの動作改善+動作設定を可能にする (#13579)おさむのひと2024-03-211-15/+52
| | | | | | | | | | | | | | | | | | | | | | | * wip * support new version * URLプレビュー無効化時、フロント側も非表示にしてリクエストをしないようにする * fix lint * fix lint * tweak preview request error handles * fix: CHANGELOG.md * fix * fix --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
* (re) update SPDX-FileCopyrightTexttamaina2024-02-131-1/+1
| | | | Fix #13290
* Revert "update SPDX-FileCopyrightText"tamaina2024-02-131-1/+1
| | | | This reverts commit 9b5aeb76d8c9372d67058c512597152b6bf222f2.
* update SPDX-FileCopyrightTextsyuilo2024-02-121-1/+1
|
* chore: use summaly, browser-image-resizer, and sharp-read-bmp on ↵tamaina2023-12-311-1/+1
| | | | | | | | | | | | | | | registry.npmjs.org instead of git (#12856) * chore: use @misskey-dev/summaly on registry.npmjs.org instead of git * fix backend dependency * fic backend dependency * @misskey-dev/sharp-read-bmp * fix * use @misskey-dev/browser-image-resizer
* chore: ↵Shun Sakai2023-07-271-0/+5
| | | | | | | | | | | | | | 著作権とライセンスについての情報を各ファイルに追加する (#11348) * chore: Add the SPDX information to each file Add copyright and licensing information as defined in version 3.0 of the REUSE Specification. * tweak format --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* fix(backend): Fix #10786tamaina2023-05-071-2/+2
|
* fix(backend/URLPreviewService): エラーでHTTP 422を出すように (#10339)Kagami Sascha Rosylight2023-03-191-6/+12
| | | | | * fix(backend/URLPreviewService): エラーでHTTP 402を出すように * fix import
* feat(frontend/MkUrlPreview): oEmbedのサポート (#10306)Kagami Sascha Rosylight2023-03-191-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat(frontend/MkUrlPreview): oEmbedのサポート * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * playerとoEmbedの統合 * Update CHANGELOG.md * loading=lazyはここでは不要 * border: 0 * プレビュー直後にautoplayできる機能の復旧 * add test * refactor test * explain about cache * expandPreviewはもう使わない * summaly v4 * update summaly * scrolling=no to fix pixiv --------- Co-authored-by: tamaina <tamaina@hotmail.co.jp>
* fix: Do not use avif (#10301)tamaina2023-03-121-1/+1
| | | | | | | * fix: Do not use avif * fix * fix
* enhance(server): ↵tamaina2023-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | 画像圧縮周り(主にサムネイルの仕様)の変更 (#10287) * DriveService, is-mime-image * static, previewをavifに, アニメーション画像でもthumbnailを生成 * fallback * animated: true * fix * avatarはwebp * revert ?? file.url --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* enhance(server): ↵tamaina2023-02-141-10/+17
| | | | | | | | | | | | | | | | | | | URLプレビュー(summaly)はプロキシを通すように (#9905) * enhance(server): URLプレビュー(summaly)はプロキシを通すように * update summaly * update summaly * 型エラーバスター * basic.html * Delete basic.html --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
* fix(client): validate urls to improve securitysyuilo2023-02-041-0/+8
|
* perf(server): improvement of external mediaProxy (#9787)tamaina2023-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * perf(server): improvement of external mediaProxy * add a comment * :v: * /filesでsharpの処理を行わずリダイレクトする * fix * thumbnail => static * Fix #9788 * add avatar mode * add url * fix * static.webp * remove encodeURIComponent from media proxy path * remove existance check
* perf(backend): Use undici instead of node-fetch and got (#9459)tamaina2023-01-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement? HttpFetchService * :v: * remove node-fetch * fix * refactor * fix * gateway timeout * UndiciFetcherクラスを追加 (仮コミット, ビルドもstartもさせていない) * fix * add logger and fix url preview * fix ip check * enhance logger and error handling * fix * fix * clean up * Use custom fetcher for ApRequest / ApResolver * bypassProxyはproxyBypassHostsに判断を委譲するように * set maxRedirections (default 3, ApRequest/ApResolver: 0) * fix comment * handle error s3 upload * add debug message * no return await * Revert "no return await" This reverts commit b5b0dc58a342393d260492e3a6f58304372f53b2. * reduce maxSockets * apResolverのUndiciFetcherを廃止しapRequestのものを使う、 add ap logger * Revert "apResolverのUndiciFetcherを廃止しapRequestのものを使う、 add ap logger" This reverts commit 997243915c8e1f8472da64f607f88c36cb1d5cb4. * add logger * fix * change logger name * safe * デフォルトでUser-Agentを設定
* Fix import related TypeScript errors (#9321)Kagami Sascha Rosylight2022-12-141-1/+1
| | | | | | | * Add missing @types packages * Fix TS1272 type only imports * Fix TS2821 import assertion
* refactor: introduce bindThis decorator to bind this automaticalysyuilo2022-12-041-0/+3
|
* Fastify (#9106)syuilo2022-12-031-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * fix * Update SignupApiService.ts * wip * wip * Update ClientServerService.ts * wip * wip * wip * Update WellKnownServerService.ts * wip * wip * update des * wip * Update ApiServerService.ts * wip * update deps * Update WellKnownServerService.ts * wip * update deps * Update ApiCallService.ts * Update ApiCallService.ts * Update ApiServerService.ts
* fix import typesyuilo2022-09-211-2/+2
|
* testsyuilo2022-09-191-8/+8
|
* refactor(backend): refactor loggersyuilo2022-09-181-2/+4
|
* なんかもうめっちゃ変えたsyuilo2022-09-181-0/+84